Skip to content

Commit

Permalink
inql.util: fix json_encode for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed May 11, 2021
1 parent 6a25fdb commit 1218043
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def override_headers(http_metadata, overrideheaders):


def json_encode(metadata):
return {k: json.dumps(v) for k, v in metadata.items()}
return {k: json.dumps(v) if not isinstance(v, str) else v for k, v in metadata.items()}


def clean_dict(metadata):
Expand Down Expand Up @@ -754,4 +754,4 @@ def raw_request(request):
request.get_method() + ' ' + path + ' HTTP/1.1',
'\r\n'.join('{}: {}'.format(k, v) for k, v in headers.items()),
request.data if request.data else '',
)
)

0 comments on commit 1218043

Please sign in to comment.