瀏覽代碼

modify localizeContainersToAnotherPage@2

zealllot 1 年之前
父節點
當前提交
4e28db169b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pagebuilder/editor.go

+ 1 - 1
pagebuilder/editor.go

@@ -759,7 +759,7 @@ func (b *Builder) localizeContainersToAnotherPage(db *gorm.DB, pageID int, pageV
 		} else {
 			var count int64
 			var sharedCon Container
-			if err = db.Where("localize_from_model_id = ? AND locale_code = ? AND shared = ?", c.ModelID, toPageLocale, true).First(&sharedCon).Count(&count).Error; err != nil && err != gorm.ErrRecordNotFound {
+			if err = db.Where("model_name = ? AND localize_from_model_id = ? AND locale_code = ? AND shared = ?", c.ModelName, c.ModelID, toPageLocale, true).First(&sharedCon).Count(&count).Error; err != nil && err != gorm.ErrRecordNotFound {
 				return
 			}