Skip to content

Commit

Permalink
Merge pull request #2685 from onaio/add-throttle-scopes-for-xform-lis…
Browse files Browse the repository at this point in the history
…t-and-xform-submission

Add throttle scopes for xform_list and xform_submission viewsets
  • Loading branch information
FrankApiyo committed Aug 29, 2024
2 parents c5603b6 + 24a5208 commit 000b72d
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 000b72d

Please sign in to comment.