formdef: sort keys in export_to_json() (~ #37868)

This commit is contained in:
Benjamin Dauvergne 2019-11-21 23:06:06 +01:00 committed by Frédéric Péters
parent 618e0c81a4
commit 1b33a1de18
1 changed files with 1 additions and 1 deletions

View File

@ -775,7 +775,7 @@ class FormDef(StorableObject):
if self.required_authentication_contexts:
root['required_authentication_contexts'] = self.required_authentication_contexts[:]
return json.dumps(root, indent=indent, cls=misc.JSONEncoder)
return json.dumps(root, indent=indent, sort_keys=True, cls=misc.JSONEncoder)
@classmethod
def import_from_json(cls, fd, charset=None, include_id=False):