change retrieve function in quota

This commit is contained in:
2025-11-16 15:51:15 +03:30
parent 13f3c90f50
commit 450a02dda1
3 changed files with 20 additions and 4 deletions

View File

@@ -287,6 +287,13 @@ class QuotaViewSet(BaseViewSet, SoftDeleteMixin, viewsets.ModelViewSet, DynamicS
return Response(data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_403_FORBIDDEN)
def retrieve(self, request, *args, **kwargs):
instance = self.get_object()
serializer = self.get_serializer(instance, context={
"org": get_organization_by_user(request.user)
})
return Response(serializer.data)
@action(
methods=['patch'],
detail=True,