From eaa3bc6576d3cf2526d8dc1b675d5a95dd83d0dd Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 28 Mar 2024 14:21:28 -0400 Subject: [PATCH] Fixes #15570: Remove omission of M2M relations when generating writable serializers for OpenAPI schema --- netbox/core/api/schema.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/netbox/core/api/schema.py b/netbox/core/api/schema.py index 8eecfa8b9..5f64dcc53 100644 --- a/netbox/core/api/schema.py +++ b/netbox/core/api/schema.py @@ -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