Skip to content

Commit

Permalink
txn history fix for old bad data (#1096)
Browse files Browse the repository at this point in the history
Signed-off-by: Kial Jinnah <[email protected]>
  • Loading branch information
kialj876 authored Jun 1, 2021
1 parent bcba25c commit af8f387
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/namex/resources/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def get(nr):
for e in event_results:
previous_nr_event_info = copy.deepcopy(nr_event_info)
e_dict = e.json()
event_json_data = dict(json.loads(e_dict['jsonData']))

# handle parsing new and older data
event_json_data = dict(json.loads(e_dict['jsonData'])) if type(e_dict['jsonData']) == str else e_dict['jsonData']

# skip unneeded events for transaction history due to workflow:
# - 1. patch[checkout] changes the NR state to inprogress
Expand Down

0 comments on commit af8f387

Please sign in to comment.