mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
Merge pull request #562 from mjtamlyn/view-name
Support URL namespaces.
This commit is contained in:
commit
47f0d17f4d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user