1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix retrieval of model under viewsets without a statically defined queryset

This commit is contained in:
Jeremy Stretch
2017-01-27 15:12:46 -05:00
parent a3d0d4a5bf
commit c0dac1383d

View File

@ -21,7 +21,7 @@ class WritableSerializerMixin(object):
class WritableSerializer(ModelSerializer):
class Meta:
model = self.queryset.model
model = self.get_queryset().model
fields = '__all__'
if self.action in WRITE_OPERATIONS: