From 24caa3bf1f51ef3d4fb7f6ad5b4cb5b2c08b16b4 Mon Sep 17 00:00:00 2001 From: Brian Tiemann Date: Tue, 22 Oct 2024 11:54:39 -0400 Subject: [PATCH] Revert nullability --- netbox/ipam/graphql/types.py | 2 +- netbox/ipam/models/vlans.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/graphql/types.py b/netbox/ipam/graphql/types.py index 0563683f1..9b3becc17 100644 --- a/netbox/ipam/graphql/types.py +++ b/netbox/ipam/graphql/types.py @@ -291,7 +291,7 @@ class VLANTranslationPolicyType(NetBoxObjectType): filters=VLANTranslationRuleFilter ) class VLANTranslationRuleType(NetBoxObjectType): - policy: Annotated["VLANTranslationPolicyType", strawberry.lazy('ipam.graphql.types')] + policy: Annotated["VLANTranslationPolicyType", strawberry.lazy('ipam.graphql.types')] | None @strawberry_django.type( diff --git a/netbox/ipam/models/vlans.py b/netbox/ipam/models/vlans.py index 56c7b7a81..dbc3a9a78 100644 --- a/netbox/ipam/models/vlans.py +++ b/netbox/ipam/models/vlans.py @@ -331,7 +331,8 @@ class VLANTranslationRule(NetBoxModel): ) def __str__(self): - return f'{self.local_vid} -> {self.remote_vid} ({self.policy})' + return f'{self.local_vid} -> {self.remote_vid}' + # return f'{self.local_vid} -> {self.remote_vid} ({self.policy})' def to_objectchange(self, action): objectchange = super().to_objectchange(action)