From 4d8c8b199c31a55752b6c9ac2d9a33ae98f1b0f0 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 18 Sep 2023 18:37:41 -0500 Subject: [PATCH] Fix bug for new receiving from scratch via API --- tailbone/api/batch/receiving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailbone/api/batch/receiving.py b/tailbone/api/batch/receiving.py index 284d8fdb..57501a7d 100644 --- a/tailbone/api/batch/receiving.py +++ b/tailbone/api/batch/receiving.py @@ -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)