fix: item category with item form.

This commit is contained in:
Ahmed Bouhuolia
2020-11-11 11:50:23 +02:00
parent aabd42a7a1
commit 3616b31270
2 changed files with 5 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ export default class ItemsCategoriesController extends BaseController {
return [
check('name').exists().trim().escape(),
check('parent_category_id')
.optional({ nullable: true, checkFalsy: true })
.optional({ nullable: true })
.isNumeric()
.toInt(),
check('description')
@@ -88,15 +88,15 @@ export default class ItemsCategoriesController extends BaseController {
.trim()
.escape(),
check('sell_account_id')
.optional({ nullable: true, checkFalsy: true })
.optional({ nullable: true })
.isNumeric()
.toInt(),
check('cost_account_id')
.optional()
.optional({ nullable: true })
.isNumeric()
.toInt(),
check('inventory_account_id')
.optional()
.optional({ nullable: true })
.isNumeric()
.toInt(),
]