some apis of pos
This commit is contained in:
@@ -143,14 +143,9 @@ class RancherViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
|
||||
""" check national code & existence of rancher """
|
||||
|
||||
rancher = self.queryset.filter(national_code=request.data['national_code'])
|
||||
inventory = InventoryEntry.objects.get(id=43)
|
||||
|
||||
# get rancher live stocks information ant total quota for rancher
|
||||
rancher_quota_by_live_stock = rancher_quota_weight(rancher.first(), inventory)
|
||||
|
||||
if rancher.exists():
|
||||
serializer = self.serializer_class(rancher.first())
|
||||
|
||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||
else:
|
||||
return Response({
|
||||
|
||||
Reference in New Issue
Block a user