Removed useless hasattr in UpdateQuery._setup_query().

The if statement always evaluates to True.
This commit is contained in:
Tim Graham 2017-07-08 08:12:46 -04:00 committed by GitHub
parent a8c70abfdf
commit 31a2af1c01
1 changed files with 1 additions and 2 deletions

View File

@ -93,8 +93,7 @@ class UpdateQuery(Query):
"""
self.values = []
self.related_ids = None
if not hasattr(self, 'related_updates'):
self.related_updates = {}
self.related_updates = {}
def clone(self, klass=None, **kwargs):
return super().clone(klass, related_updates=self.related_updates.copy(), **kwargs)