Remove unreachable code

This commit is contained in:
Artem Muterko 2017-01-17 15:47:29 +02:00
parent 06a5bcc88e
commit d18b1f351c

View File

@ -132,13 +132,6 @@ class UniqueTogetherValidator(object):
"""
Filter the queryset to all instances matching the given attributes.
"""
# If this is an update, then any unprovided field should
# have it's value set based on the existing instance attribute.
if self.instance is not None:
for field_name in self.fields:
if field_name not in attrs:
attrs[field_name] = getattr(self.instance, field_name)
# Determine the filter keyword arguments and filter the queryset.
filter_kwargs = {
field_name: attrs[field_name]