- fixed item creation, which was broken by last update

This commit is contained in:
2023-07-07 15:13:17 +02:00
parent 185d563ac0
commit 57513da827
2 changed files with 7 additions and 4 deletions

View File

@ -102,9 +102,9 @@ function post(req: Request, res: Response) {
comment: req.body.comment,
status: req.body.status, // Only enum(itemStatus) values are valid
// Relations
contactInfo: parseIntRelation(req.body.contactInfoId),
category: parseIntRelation(req.body.categoryId),
storageLocation: parseIntRelation(req.body.storageLocationId),
contactInfo: parseIntRelation(req.body.contactInfoId, undefined, true),
category: parseIntRelation(req.body.categoryId, undefined, true),
storageLocation: parseIntRelation(req.body.storageLocationId, undefined, true),
manufacturer: req.body.manufacturer,