Skip to content

Commit

Permalink
added installed_module on NestedModuleBaySerializer #15243
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi1693 committed Feb 23, 2024
1 parent c21ec21 commit ed17376
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions netbox/dcim/api/nested_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ class Meta:

class NestedModuleBaySerializer(WritableNestedSerializer):
url = serializers.HyperlinkedIdentityField(view_name='dcim-api:modulebay-detail')
module = NestedModuleSerializer(required=False, read_only=True, allow_null=True)
installed_module = ModuleBayNestedModuleSerializer(required=False, allow_null=True)

class Meta:
model = models.ModuleBay
fields = ['id', 'url', 'display', 'module', 'name']
fields = ['id', 'url', 'display', 'installed_module', 'name']


class NestedDeviceBaySerializer(WritableNestedSerializer):
Expand Down
3 changes: 1 addition & 2 deletions netbox/dcim/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,7 @@ class Meta:
model = ModuleBay
fields = [
'id', 'url', 'display', 'device', 'name', 'installed_module', 'label', 'position', 'description', 'tags',
'custom_fields',
'created', 'last_updated',
'custom_fields', 'created', 'last_updated',
]


Expand Down

0 comments on commit ed17376

Please sign in to comment.