Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.

Fixing issue with updating work order receipt #694

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sourabh-natesh
Copy link

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: Sourabh Natesh [email protected]

@danintel
Copy link
Contributor

You have no commit message, so the build is also failing. Put the message above, including your DCO signature line, in the commit. You can amend your commit with
git commit --amend
Then force push the commit to your github workspace:
git push -f <your workspace> <github workspace>

- Pushing the fix for the issue hyperledger-archives#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 <[email protected]>
Copy link
Contributor

@rranjan3 rranjan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At line 143 also we are converting to serialized string, which is duplicate. instead of line 138 we can use wo_resp_str at 143 and remove serialization at 138.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants