From d18b1f351c67838e8d26437d58d9e4ef651edcad Mon Sep 17 00:00:00 2001 From: Artem Muterko Date: Tue, 17 Jan 2017 15:47:29 +0200 Subject: [PATCH] Remove unreachable code --- rest_framework/validators.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rest_framework/validators.py b/rest_framework/validators.py index 57f8bad53..1c7538073 100644 --- a/rest_framework/validators.py +++ b/rest_framework/validators.py @@ -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]