DmitrMakeev commited on
Commit
6ff375c
1 Parent(s): ee4861c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -822,14 +822,16 @@ def send_get_request():
822
  if response.status_code == 200:
823
  data = response.json()
824
 
825
- report_json_str = data.get('report', {}).get('report', '{}')
826
- messages_json_str = data.get('messages', '{}')
827
 
 
828
  try:
829
  report_json = json.loads(report_json_str)
830
  except json.JSONDecodeError:
831
  report_json = {}
832
 
 
833
  try:
834
  messages_json = json.loads(messages_json_str)
835
  except json.JSONDecodeError:
@@ -867,10 +869,6 @@ def send_get_request():
867
 
868
 
869
 
870
-
871
-
872
-
873
-
874
 
875
 
876
 
 
822
  if response.status_code == 200:
823
  data = response.json()
824
 
825
+ report = data.get('report', {})
826
+ messages = data.get('messages', {})
827
 
828
+ report_json_str = report.get('report', '{}')
829
  try:
830
  report_json = json.loads(report_json_str)
831
  except json.JSONDecodeError:
832
  report_json = {}
833
 
834
+ messages_json_str = messages.get('messages', '{}')
835
  try:
836
  messages_json = json.loads(messages_json_str)
837
  except json.JSONDecodeError:
 
869
 
870
 
871
 
 
 
 
 
872
 
873
 
874