Ejemplo n.º 1
0
 def obj_get(self, request, **kwargs):
     case = get_object_or_not_exist(CommCareCase, kwargs["pk"], kwargs["domain"])
     return StockStatus.from_case(case)
Ejemplo n.º 2
0
 def obj_get_list(self, request, **kwargs):
     location_id = request.GET.get("location_id", None)
     if location_id:
         return StockStatus.by_location(kwargs['domain'], location_id)
     else:
         return StockStatus.by_domain(kwargs['domain'])
Ejemplo n.º 3
0
 def obj_get_list(self, request, **kwargs):
     location_id = request.GET.get("location_id", None)
     if location_id:
         return StockStatus.by_location(kwargs['domain'], location_id)
     else:
         return StockStatus.by_domain(kwargs['domain'])