create rancher incentive plan structure - add pos device main sheba

This commit is contained in:
2025-09-24 11:00:48 +03:30
parent 73111950b4
commit d0db6c9693
7 changed files with 80 additions and 17 deletions

View File

@@ -106,7 +106,11 @@ class QuotaDistributionViewSet(viewsets.ModelViewSet, DynamicSearchMixin, POSDev
# paginate & response
page = self.paginate_queryset(available_distributions) # noqa
if page is not None:
serializer = self.get_serializer(page, many=True, context={'rancher': rancher.first(), 'device': device})
serializer = self.get_serializer(page, many=True, context={
'rancher': rancher.first(),
'device': device,
'organization': organization
})
# set custom message for paginator
if not rancher:
self.paginator.set_message("دامدار با کد ملی مد نظر یافت نشد") # noqa