mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 19:08:38 -06:00
Add none check
This commit is contained in:
parent
c232ca7acc
commit
640e438ef6
@ -287,6 +287,8 @@ class FixWritableNestedSerializerAllowPK(OpenApiSerializerFieldExtension):
|
||||
|
||||
def map_serializer_field(self, auto_schema, direction):
|
||||
schema = auto_schema._map_serializer_field(self.target, direction, bypass_extensions=True)
|
||||
if schema is None:
|
||||
return schema
|
||||
if direction == 'request' and self.target.nested:
|
||||
return {
|
||||
'oneOf': [
|
||||
|
Loading…
Reference in New Issue
Block a user