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

Fixes #15570: Remove omission of M2M relations when generating writable serializers for OpenAPI schema

This commit is contained in:
Jeremy Stretch
2024-03-28 14:21:28 -04:00
parent 99508150d3
commit eaa3bc6576

View File

@ -156,8 +156,6 @@ class NetBoxAutoSchema(AutoSchema):
remove_fields.append(child_name)
if isinstance(child, (ChoiceField, WritableNestedSerializer)):
properties[child_name] = None
elif isinstance(child, ManyRelatedField) and isinstance(child.child_relation, SerializedPKRelatedField):
properties[child_name] = None
if not properties:
return None