mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Enabled creation of device components
This commit is contained in:
@@ -20,9 +20,8 @@ class WritableSerializerMixin(object):
|
||||
|
||||
class WritableSerializer(ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = self.get_queryset().model
|
||||
fields = '__all__'
|
||||
class Meta(self.serializer_class.Meta):
|
||||
pass
|
||||
|
||||
if self.action in WRITE_OPERATIONS:
|
||||
return WritableSerializer
|
||||
|
||||
Reference in New Issue
Block a user