place the transaction category at the end of the primary category after changing primary category

This commit is contained in:
MaysWind
2026-01-17 23:13:16 +08:00
parent 8447dd7ae6
commit 8db69f64c8
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ func (s *TransactionCategoryService) ModifyCategory(c core.Context, category *mo
category.UpdatedUnixTime = time.Now().Unix()
return s.UserDataDB(category.Uid).DoTransaction(c, func(sess *xorm.Session) error {
updatedRows, err := sess.ID(category.CategoryId).Cols("parent_category_id", "name", "icon", "color", "comment", "hidden", "updated_unix_time").Where("uid=? AND deleted=?", category.Uid, false).Update(category)
updatedRows, err := sess.ID(category.CategoryId).Cols("parent_category_id", "name", "display_order", "icon", "color", "comment", "hidden", "updated_unix_time").Where("uid=? AND deleted=?", category.Uid, false).Update(category)
if err != nil {
return err