Fix bug for new receiving from scratch via API

This commit is contained in:
Lance Edgar 2023-09-18 18:37:41 -05:00
parent d1d69e9488
commit 4d8c8b199c

View file

@ -83,7 +83,7 @@ class ReceivingBatchViews(APIBatchView):
data['mode'] = self.enum.PURCHASE_BATCH_MODE_RECEIVING
# assume "receive from PO" if given a PO key
if data['purchase_key']:
if data.get('purchase_key'):
data['receiving_workflow'] = 'from_po'
return super().create_object(data)