We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7668fb commit 54c6d95Copy full SHA for 54c6d95
netbox/vpn/api/serializers.py
@@ -98,6 +98,9 @@ class Meta:
98
99
@extend_schema_field(serializers.JSONField(allow_null=True))
100
def get_termination(self, obj):
101
+ if not obj.termination:
102
+ return None
103
+
104
serializer = get_serializer_for_model(obj.termination, prefix=NESTED_SERIALIZER_PREFIX)
105
context = {'request': self.context['request']}
106
return serializer(obj.termination, context=context).data
0 commit comments