Fix ClearUnusedTags

This commit is contained in:
2025-06-14 17:44:21 +08:00
parent 45a48470df
commit 3416cfd280

View File

@@ -159,7 +159,7 @@ func ClearUnusedTags() error {
return err return err
} }
// Remove all aliases of the tag // Remove all aliases of the tag
if err := db.Where("alias_of = ?", tag.ID).Update("alias_of", nil).Error; err != nil { if err := db.Model(model.Tag{}).Where("alias_of = ?", tag.ID).Update("alias_of", nil).Error; err != nil {
return err return err
} }
// Use hard delete to remove the tag to ensure the tag can be re-created later // Use hard delete to remove the tag to ensure the tag can be re-created later