Skip to content

Commit 756e82c

Browse files
committed
fix(graphql): Allow nullable prefix fields in types
Updates `source_prefix` and `destination_prefix` fields to be nullable. This ensures compatibility with cases where prefixes may not be provided. Fixes: #249
1 parent 2f0dbf0 commit 756e82c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

netbox_acls/graphql/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ACLStandardRuleType(NetBoxObjectType):
6666
"""
6767

6868
access_list: Annotated["AccessListType", strawberry.lazy("netbox_acls.graphql.types")]
69-
source_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]
69+
source_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")] | None
7070

7171

7272
@strawberry_django.type(
@@ -80,7 +80,7 @@ class ACLExtendedRuleType(NetBoxObjectType):
8080
"""
8181

8282
access_list: Annotated["AccessListType", strawberry.lazy("netbox_acls.graphql.types")]
83-
source_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]
83+
source_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")] | None
8484
source_ports: List[int] | None
85-
destination_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]
85+
destination_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")] | None
8686
destination_ports: List[int] | None

0 commit comments

Comments
 (0)