not allow to delete category when other transaction is using it
This commit is contained in:
@@ -299,7 +299,7 @@ func (a *TransactionCategoriesApi) CategoryDeleteHandler(c *core.Context) (inter
|
||||
}
|
||||
|
||||
uid := c.GetCurrentUid()
|
||||
err = a.categories.DeleteCategories(uid, []int64{categoryDeleteReq.Id})
|
||||
err = a.categories.DeleteCategory(uid, categoryDeleteReq.Id)
|
||||
|
||||
if err != nil {
|
||||
log.ErrorfWithRequestId(c, "[transaction_categories.CategoryDeleteHandler] failed to delete category \"id:%d\" for user \"uid:%d\", because %s", categoryDeleteReq.Id, uid, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user