mirror of https://github.com/django/django.git
Removed useless hasattr in UpdateQuery._setup_query().
The if statement always evaluates to True.
This commit is contained in:
parent
a8c70abfdf
commit
31a2af1c01
|
@ -93,8 +93,7 @@ class UpdateQuery(Query):
|
||||||
"""
|
"""
|
||||||
self.values = []
|
self.values = []
|
||||||
self.related_ids = None
|
self.related_ids = None
|
||||||
if not hasattr(self, 'related_updates'):
|
self.related_updates = {}
|
||||||
self.related_updates = {}
|
|
||||||
|
|
||||||
def clone(self, klass=None, **kwargs):
|
def clone(self, klass=None, **kwargs):
|
||||||
return super().clone(klass, related_updates=self.related_updates.copy(), **kwargs)
|
return super().clone(klass, related_updates=self.related_updates.copy(), **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue