From 3c64cff93dbb115c06bebd18be1357c80d94cfd7 Mon Sep 17 00:00:00 2001 From: snatesh Date: Mon, 12 Oct 2020 16:43:34 +0530 Subject: [PATCH] Fixing issue with updating work order receipt - Pushing the fix for the issue #693 . - In the file work_order_receipt.py, in line 163, while creating the update receipt - we concatenate the update data to the work order receipt string. The issue is that if the receipt create status has the value FAILED, the update data will be a dictionary, and hence, concatenating it to the string will cause the enclave manager to crash. - Have pushed code to convert this update data into a string so that it can be concatenated. Signed-off-by: snatesh --- sdk/avalon_sdk/work_order_receipt/work_order_receipt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/avalon_sdk/work_order_receipt/work_order_receipt.py b/sdk/avalon_sdk/work_order_receipt/work_order_receipt.py index 1d975836f..4de885e2b 100644 --- a/sdk/avalon_sdk/work_order_receipt/work_order_receipt.py +++ b/sdk/avalon_sdk/work_order_receipt/work_order_receipt.py @@ -135,7 +135,7 @@ def update_receipt(self, work_order_id, update_type, Returns: JSON RPC work order update receipt request of type dictionary """ - data = update_data + data = json.dumps(update_data) if update_type in [ReceiptCreateStatus.PROCESSED.value, ReceiptCreateStatus.COMPLETED.value]: # Work Order Receipt status is set to be completed or processed,