mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 10:14:26 +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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if !has {
|
||||||
|
return nil, errs.ErrTransactionCategoryNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
if has {
|
return category, nil
|
||||||
return category, nil
|
|
||||||
} else {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *TransactionCategoryService) GetCategoryAndSubCategoriesByCategoryId(uid int64, categoryId int64) ([]*models.TransactionCategory, error) {
|
func (s *TransactionCategoryService) GetCategoryAndSubCategoriesByCategoryId(uid int64, categoryId int64) ([]*models.TransactionCategory, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user