mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
Fix HyperlinkedModelSerializer not respecting lookup_fields
This commit is contained in:
parent
939cc5adba
commit
0176a5391b
|
@ -827,7 +827,7 @@ class HyperlinkedModelSerializerOptions(ModelSerializerOptions):
|
|||
def __init__(self, meta):
|
||||
super(HyperlinkedModelSerializerOptions, self).__init__(meta)
|
||||
self.view_name = getattr(meta, 'view_name', None)
|
||||
self.lookup_field = getattr(meta, 'slug_field', None)
|
||||
self.lookup_field = getattr(meta, 'lookup_field', None)
|
||||
|
||||
|
||||
class HyperlinkedModelSerializer(ModelSerializer):
|
||||
|
|
Loading…
Reference in New Issue
Block a user