forked from CGM_Public/pretix_original
Sort keys in JSON payment metadata
This commit is contained in:
@@ -86,7 +86,7 @@ class LoggingMixin:
|
|||||||
if (sensitivekey in k) and v:
|
if (sensitivekey in k) and v:
|
||||||
data[k] = "********"
|
data[k] = "********"
|
||||||
|
|
||||||
logentry.data = json.dumps(data, cls=CustomJSONEncoder)
|
logentry.data = json.dumps(data, cls=CustomJSONEncoder, sort_keys=True)
|
||||||
elif data:
|
elif data:
|
||||||
raise TypeError("You should only supply dictionaries as log data.")
|
raise TypeError("You should only supply dictionaries as log data.")
|
||||||
if save:
|
if save:
|
||||||
|
|||||||
@@ -1185,7 +1185,7 @@ class OrderPayment(models.Model):
|
|||||||
|
|
||||||
@info_data.setter
|
@info_data.setter
|
||||||
def info_data(self, d):
|
def info_data(self, d):
|
||||||
self.info = json.dumps(d)
|
self.info = json.dumps(d, sort_keys=True)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def payment_provider(self):
|
def payment_provider(self):
|
||||||
@@ -1543,7 +1543,7 @@ class OrderRefund(models.Model):
|
|||||||
|
|
||||||
@info_data.setter
|
@info_data.setter
|
||||||
def info_data(self, d):
|
def info_data(self, d):
|
||||||
self.info = json.dumps(d)
|
self.info = json.dumps(d, sort_keys=True)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def payment_provider(self):
|
def payment_provider(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user