We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c5a593 commit b039a44Copy full SHA for b039a44
coral_credits/api/views.py
@@ -23,10 +23,12 @@ class CreditAllocationViewSet(viewsets.ModelViewSet):
23
24
25
class CreditAllocationResourceViewSet(viewsets.ModelViewSet):
26
- queryset = models.CreditAllocationResource.objects.all()
27
serializer_class = serializers.CreditAllocationResourceSerializer
28
permission_classes = [permissions.IsAuthenticated]
29
+ def get_queryset(self):
30
+ return models.CreditAllocationResource.objects.filter(allocation__pk=self.kwargs["allocation_pk"])
31
+
32
def _create_update_credit_allocations(self, request, allocation_pk):
33
"""Allocate credits to a dictionary of resource classes.
34
0 commit comments