mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
fix null pointer bug
This commit is contained in:
@@ -67,13 +67,11 @@ func (s *TransactionCategoryService) GetCategoryByCategoryId(uid int64, category
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, errs.ErrTransactionCategoryNotFound
|
||||
}
|
||||
|
||||
if has {
|
||||
return category, nil
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
return category, nil
|
||||
}
|
||||
|
||||
func (s *TransactionCategoryService) GetCategoryAndSubCategoriesByCategoryId(uid int64, categoryId int64) ([]*models.TransactionCategory, error) {
|
||||
|
||||
Reference in New Issue
Block a user