🐛 Trying fix cannot edit tags & categories after published
This commit is contained in:
parent
19e1b5f7c6
commit
62d09717bb
@ -479,6 +479,9 @@ func EditPost(item models.Post) (models.Post, error) {
|
|||||||
return item, err
|
return item, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
database.C.Model(&item).Association("Categories").Replace(item.Categories)
|
||||||
|
database.C.Model(&item).Association("Tags").Replace(item.Tags)
|
||||||
|
|
||||||
err = database.C.Save(&item).Error
|
err = database.C.Save(&item).Error
|
||||||
|
|
||||||
return item, err
|
return item, err
|
||||||
|
Loading…
Reference in New Issue
Block a user