Commit dcbe8b8a authored by Mihai Patrascoiu's avatar Mihai Patrascoiu
Browse files

FTS-1666: Treat params::job_metadata correctly when it is already a dictionary

parent c82e96dc
Pipeline #2241105 failed with stage
in 24 seconds
......@@ -20,6 +20,7 @@ import time
import types
import uuid
import pylons
import json
from datetime import datetime
from urlparse import urlparse,parse_qsl, ParseResult
......@@ -102,6 +103,8 @@ def _validate_url(url):
raise ValueError('Missing host (%s)' % url.geturl())
def _metadata(data):
if isinstance(data, dict):
return data
try:
return json.loads(data)
except:
......
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