Returns null for order number if it’s blank

This commit is contained in:
snipe 2017-10-28 15:53:22 -07:00
parent 1076ec96be
commit 0fd0e3a8b4

View file

@ -49,7 +49,7 @@ class AssetsTransformer
'name'=> e($asset->supplier->name)
] : null,
'notes' => ($asset->notes) ? e($asset->notes) : null,
'order_number' => e($asset->order_number),
'order_number' => ($asset->order_number) ? e($asset->order_number) : null,
'company' => ($asset->company) ? [
'id' => (int) $asset->company->id,
'name'=> e($asset->company->name)