mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Tweak erronous assignment
This commit is contained in:
parent
3ea394dbff
commit
0cbfbc27d8
|
@ -219,7 +219,7 @@ class HyperlinkedRelatedField(RelatedField):
|
|||
|
||||
def __init__(self, view_name=None, **kwargs):
|
||||
if view_name is not None:
|
||||
view_name = self.view_name = view_name
|
||||
self.view_name = view_name
|
||||
assert self.view_name is not None, 'The `view_name` argument is required.'
|
||||
self.lookup_field = kwargs.pop('lookup_field', self.lookup_field)
|
||||
self.lookup_url_kwarg = kwargs.pop('lookup_url_kwarg', self.lookup_field)
|
||||
|
|
Loading…
Reference in New Issue
Block a user