From 7dfe03f86d7e44393f9ea85875d6967e05e84ef3 Mon Sep 17 00:00:00 2001 From: orf Date: Fri, 21 Jul 2017 01:51:07 +0100 Subject: [PATCH] Sorted display of options in Func.__repr__(). --- django/db/models/expressions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index dde39e80f0..e4c0e1307a 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -533,7 +533,7 @@ class Func(Expression): args = self.arg_joiner.join(str(arg) for arg in self.source_expressions) extra = dict(self.extra, **self._get_repr_options()) if extra: - extra = ', '.join(str(key) + '=' + str(val) for key, val in extra.items()) + extra = ', '.join(str(key) + '=' + str(val) for key, val in sorted(extra.items())) return "{}({}, {})".format(self.__class__.__name__, args, extra) return "{}({})".format(self.__class__.__name__, args)