diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2021-09-21 00:49:16 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-07-27 10:06:24 +0200 |
| commit | 9dff316be41847c505ebf397e4a52a0a71e0acc4 (patch) | |
| tree | 1bf4412223b6c0467ae5107df9422ea1406b86d6 /django/utils/tree.py | |
| parent | 845667f2d1eb7063c568764a01fc9ee633ec5817 (diff) | |
Refs #32948, Refs #32946 -- Used Q.create() internally for dynamic Q() objects.
Node.create() which has a compatible signature with Node.__init__()
takes in a single `children` argument rather than relying in unpacking
*args in Q.__init__() which calls Node.__init__().
In addition, we were often needing to unpack iterables into *args and
can instead pass a list direct to Node.create().
Diffstat (limited to 'django/utils/tree.py')
| -rw-r--r-- | django/utils/tree.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/tree.py b/django/utils/tree.py index d897cbeacd..443e996700 100644 --- a/django/utils/tree.py +++ b/django/utils/tree.py @@ -33,7 +33,7 @@ class Node: __init__() with a signature that conflicts with the one defined in Node.__init__(). """ - obj = Node(children, connector, negated) + obj = Node(children, connector or cls.default, negated) obj.__class__ = cls return obj |
