Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Import API
Commits
044506f5
Commit
044506f5
authored
May 04, 2021
by
Matthias
Browse files
fix json handling
parent
e604e105
Pipeline
#25898
passed with stages
in 1 minute and 58 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
import_api_app/resources/WriteJobResultsToDrupal.py
View file @
044506f5
...
@@ -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
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment