Browse Source

modify localizeContainersToAnotherPage@2

zealllot 1 year ago
parent
commit
4e28db169b
1 changed files with 1 additions and 1 deletions
  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
 			}