Skip to content

Commit d4dae20

Browse files
committed
feat(views): Improve view docstrings and adjust prefetch fields
Updated docstrings for clarity by replacing "&" with "and" in multiple view classes. Revised prefetch fields in ACLStandardRule and ACLExtendedRule to align with the new generic source/destination model changes for better consistency.
1 parent 5afe0bf commit d4dae20

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

netbox_acls/api/views.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class AccessListViewSet(NetBoxModelViewSet):
2727
"""
28-
Defines the view set for the django AccessList model & associates it to a view.
28+
Defines the view set for the django AccessList model and associates it with a view.
2929
"""
3030

3131
queryset = (
@@ -41,7 +41,7 @@ class AccessListViewSet(NetBoxModelViewSet):
4141

4242
class ACLInterfaceAssignmentViewSet(NetBoxModelViewSet):
4343
"""
44-
Defines the view set for the django ACLInterfaceAssignment model & associates it to a view.
44+
Defines the view set for the django ACLInterfaceAssignment model and associates it with a view.
4545
"""
4646

4747
queryset = models.ACLInterfaceAssignment.objects.prefetch_related(
@@ -54,28 +54,28 @@ class ACLInterfaceAssignmentViewSet(NetBoxModelViewSet):
5454

5555
class ACLStandardRuleViewSet(NetBoxModelViewSet):
5656
"""
57-
Defines the view set for the django ACLStandardRule model & associates it to a view.
57+
Defines the view set for the django ACLStandardRule model and associates it with a view.
5858
"""
5959

6060
queryset = models.ACLStandardRule.objects.prefetch_related(
6161
"access_list",
62+
"source",
6263
"tags",
63-
"source_prefix",
6464
)
6565
serializer_class = ACLStandardRuleSerializer
6666
filterset_class = filtersets.ACLStandardRuleFilterSet
6767

6868

6969
class ACLExtendedRuleViewSet(NetBoxModelViewSet):
7070
"""
71-
Defines the view set for the django ACLExtendedRule model & associates it to a view.
71+
Defines the view set for the django ACLExtendedRule model and associates it with a view.
7272
"""
7373

7474
queryset = models.ACLExtendedRule.objects.prefetch_related(
7575
"access_list",
76+
"source",
77+
"destination",
7678
"tags",
77-
"source_prefix",
78-
"destination_prefix",
7979
)
8080
serializer_class = ACLExtendedRuleSerializer
8181
filterset_class = filtersets.ACLExtendedRuleFilterSet

0 commit comments

Comments
 (0)