diff options
author | Tim Graham <timograham@gmail.com> | 2018-02-12 14:00:29 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-02-12 14:52:32 -0500 |
commit | b95c49c954e3b75678bb258e9fb2ec30d0d960bb (patch) | |
tree | 31ec388f6e51d3c39aee0836251017170307edec /django/db/models/query_utils.py | |
parent | a6fb81750a2f2c426e44f828b0e06420e760bf6d (diff) | |
download | django-b95c49c954e3b75678bb258e9fb2ec30d0d960bb.tar.gz |
Fixed #29125 -- Made Q.deconstruct() deterministic with multiple keyword arguments.
Diffstat (limited to 'django/db/models/query_utils.py')
-rw-r--r-- | django/db/models/query_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py index 1dcf22fda8..e34963b65c 100644 --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -58,7 +58,7 @@ class Q(tree.Node): def __init__(self, *args, **kwargs): connector = kwargs.pop('_connector', None) negated = kwargs.pop('_negated', False) - super().__init__(children=list(args) + list(kwargs.items()), connector=connector, negated=negated) + super().__init__(children=list(args) + sorted(kwargs.items()), connector=connector, negated=negated) def _combine(self, other, conn): if not isinstance(other, Q): |