Refs #27624 -- Optimized Query.clone() a bit.
This commit is contained in:
parent
6d5709ce7d
commit
24cc51f8fb
|
@ -344,11 +344,8 @@ class Query(BaseExpression):
|
||||||
obj.subq_aliases = self.subq_aliases.copy()
|
obj.subq_aliases = self.subq_aliases.copy()
|
||||||
obj.used_aliases = self.used_aliases.copy()
|
obj.used_aliases = self.used_aliases.copy()
|
||||||
obj._filtered_relations = self._filtered_relations.copy()
|
obj._filtered_relations = self._filtered_relations.copy()
|
||||||
# Clear the cached_property
|
# Clear the cached_property, if it exists.
|
||||||
try:
|
obj.__dict__.pop("base_table", None)
|
||||||
del obj.base_table
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def chain(self, klass=None):
|
def chain(self, klass=None):
|
||||||
|
|
Loading…
Reference in New Issue