mirror of
https://github.com/django/django.git
synced 2025-08-09 05:18:56 +00:00
Fixed #29125 -- Made Q.deconstruct() deterministic with multiple keyword arguments.
This commit is contained in:
parent
a6fb81750a
commit
b95c49c954
3 changed files with 14 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue