code refactor

This commit is contained in:
MaysWind
2025-04-19 00:04:04 +08:00
parent 1ac633bdd7
commit fd1242490f
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -2191,7 +2191,7 @@ func (s *TransactionService) isCategoryValid(sess *xorm.Session, transaction *mo
return errs.ErrCannotUseHiddenTransactionCategory
}
if category.ParentCategoryId < 1 {
if category.ParentCategoryId == models.LevelOneTransactionCategoryParentId {
return errs.ErrCannotUsePrimaryCategoryForTransaction
}