mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Fix ClearUnusedTags
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user