Use ResolveMatch.view_name so namespaces work.

This commit is contained in:
Marc Tamlyn 2013-01-07 14:34:45 +00:00
parent 55584928ca
commit 5bded1ecf0

View File

@ -403,7 +403,7 @@ class HyperlinkedRelatedField(RelatedField):
except:
raise ValidationError(self.error_messages['no_match'])
if match.url_name != self.view_name:
if match.view_name != self.view_name:
raise ValidationError(self.error_messages['incorrect_match'])
pk = match.kwargs.get(self.pk_url_kwarg, None)