Skip to content

Commit 76cd0c4

Browse files
committed
refactor(graphql): Remove redundant Meta classes
Eliminates unnecessary Meta classes and associated GraphQL fields for ACL models. Fixes: #249
1 parent 2571845 commit 76cd0c4

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

netbox_acls/graphql/types.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ class AccessListType(NetBoxObjectType):
3232
strawberry.union("ACLAssignmentType"),
3333
]
3434

35-
class Meta:
36-
"""
37-
Associates the filterset, fields, and model for the django model AccessList.
38-
"""
39-
40-
@strawberry_django.field
41-
def accesslists(self) -> List[Annotated["AccessList", strawberry.lazy("accesslists.graphql.types")]]:
42-
return self.accesslists.all()
43-
4435

4536
@strawberry_django.type(
4637
models.ACLInterfaceAssignment,
@@ -63,17 +54,6 @@ class ACLInterfaceAssignmentType(NetBoxObjectType):
6354
strawberry.union("ACLInterfaceAssignmentType"),
6455
]
6556

66-
class Meta:
67-
"""
68-
Associates the filterset, fields, and model for the django model ACLInterfaceAssignment.
69-
"""
70-
71-
@strawberry_django.field
72-
def aclinterfaceassignments(
73-
self,
74-
) -> List[Annotated["ACLInterfaceAssignment", strawberry.lazy("aclinterfaceassignments.graphql.types")]]:
75-
return self.aclinterfaceassignments.all()
76-
7757

7858
@strawberry_django.type(
7959
models.ACLExtendedRule,
@@ -91,17 +71,6 @@ class ACLExtendedRuleType(NetBoxObjectType):
9171
destination_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]
9272
source_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]
9373

94-
class Meta:
95-
"""
96-
Associates the filterset, fields, and model for the django model ACLExtendedRule.
97-
"""
98-
99-
@strawberry_django.field
100-
def aclextendedrules(
101-
self,
102-
) -> List[Annotated["ACLExtendedRule", strawberry.lazy("aclextendedrule.graphql.types")]]:
103-
return self.aclextendedrules.all()
104-
10574

10675
@strawberry_django.type(
10776
models.ACLStandardRule,
@@ -115,14 +84,3 @@ class ACLStandardRuleType(NetBoxObjectType):
11584

11685
access_list: Annotated["AccessListType", strawberry.lazy("netbox_acls.graphql.types")]
11786
source_prefix: Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]
118-
119-
class Meta:
120-
"""
121-
Associates the filterset, fields, and model for the django model ACLExtendedRule.
122-
"""
123-
124-
@strawberry_django.field
125-
def aclstandardrules(
126-
self,
127-
) -> List[Annotated["ACLStandardRule", strawberry.lazy("aclstandardrule.graphql.types")]]:
128-
return self.aclstandardrules.all()

0 commit comments

Comments
 (0)