[TELE-695] use json_loads from passerelle to prevent errors
This commit is contained in:
parent
bd6dc7bfeb
commit
6b52ccbca1
|
@ -18,9 +18,9 @@ from django.db import models
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from passerelle.base.models import BaseResource
|
||||
from passerelle.compat import json_loads
|
||||
from passerelle.utils.api import endpoint
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class ImioLiegeRn(BaseResource):
|
||||
|
@ -59,7 +59,7 @@ class ImioLiegeRn(BaseResource):
|
|||
str_data = ''
|
||||
if request.body is not None and request.body != b'':
|
||||
json_acceptable_string = request.body.replace("'", "\"")
|
||||
data = json.loads(json_acceptable_string)
|
||||
data = json_loads(json_acceptable_string)
|
||||
str_data = ''.join([u'&{}={}'.format(k,v) for k,v in data.items()])
|
||||
else:
|
||||
str_data = '&caller_name={}&caller_user={}&caller_environment={}&caller_version={}&caller_reason={}'.format(caller_name, caller_user,caller_environment,caller_version,caller_reason)
|
||||
|
|
Loading…
Reference in New Issue