Sort keys in JSON payment metadata

This commit is contained in:
Raphael Michel
2019-07-09 16:13:23 +02:00
parent 5a03033255
commit eef713816e
2 changed files with 3 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ class LoggingMixin:
if (sensitivekey in k) and v:
data[k] = "********"
logentry.data = json.dumps(data, cls=CustomJSONEncoder)
logentry.data = json.dumps(data, cls=CustomJSONEncoder, sort_keys=True)
elif data:
raise TypeError("You should only supply dictionaries as log data.")
if save: