Commit 044506f5 authored by Matthias's avatar Matthias
Browse files

fix json handling

parent e604e105
Pipeline #25898 passed with stages
in 1 minute and 58 seconds
...@@ -113,6 +113,7 @@ def write_results(job_drupal_uuid, job_log_drupal_uuid, status, report): ...@@ -113,6 +113,7 @@ def write_results(job_drupal_uuid, job_log_drupal_uuid, status, report):
# read "status" and "message" from log_result # read "status" and "message" from log_result
previous_status = '' previous_status = ''
previous_report = '' previous_report = ''
previous_report_json = ''
step = '' step = ''
try: try:
getUrl = current_app.config['drupal-api-url'] + \ getUrl = current_app.config['drupal-api-url'] + \
...@@ -129,10 +130,12 @@ def write_results(job_drupal_uuid, job_log_drupal_uuid, status, report): ...@@ -129,10 +130,12 @@ def write_results(job_drupal_uuid, job_log_drupal_uuid, status, report):
if previous_status == 'FAILED': if previous_status == 'FAILED':
status = previous_status status = previous_status
if previous_report is None: if previous_report is None:
previous_report = {} previous_report_json = {}
else:
previous_report_json = json.loads(previous_report)
step = report['step'] step = report['step']
previous_report[step] = report previous_report_json[step] = report
reportString = json.dumps(previous_report, indent=2) reportString = json.dumps(previous_report)
# update values in drupal: # update values in drupal:
patchCalls = {} patchCalls = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment