Skip to content

Commit

Permalink
Add throttle scopes for xform_list and xform_submission viewsets
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo committed Aug 29, 2024
1 parent c5603b6 commit 24a5208
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions onadata/apps/api/viewsets/xform_list_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class XFormListViewSet(ETagsMixin, BaseViewset, viewsets.ReadOnlyModelViewSet):
renderer_classes = (XFormListRenderer,)
serializer_class = XFormListSerializer
template_name = "api/xformsList.xml"
throttle_scope = "xformlist"

def get_object(self):
queryset = self.filter_queryset(self.get_queryset())
Expand Down
1 change: 1 addition & 0 deletions onadata/apps/api/viewsets/xform_submission_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class XFormSubmissionViewSet(
serializer_class = SubmissionSerializer
template_name = "submission.xml"
parser_classes = (FLOIPParser, JSONParser, FormParser, MultiPartParser)
throttle_scope = "submission"

def get_serializer(self, *args, **kwargs):
"""
Expand Down

0 comments on commit 24a5208

Please sign in to comment.