mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 10:16:42 -06:00
Fix retrieval of model under viewsets without a statically defined queryset
This commit is contained in:
parent
a3d0d4a5bf
commit
c0dac1383d
@ -21,7 +21,7 @@ class WritableSerializerMixin(object):
|
|||||||
class WritableSerializer(ModelSerializer):
|
class WritableSerializer(ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = self.queryset.model
|
model = self.get_queryset().model
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
|
|
||||||
if self.action in WRITE_OPERATIONS:
|
if self.action in WRITE_OPERATIONS:
|
||||||
|
Loading…
Reference in New Issue
Block a user