示例#1
0
文件: v0_1.py 项目: birdsarah/core-hq
 def obj_get(self, request, **kwargs):
     case = get_object_or_not_exist(CommCareCase, kwargs["pk"], kwargs["domain"])
     return StockStatus.from_case(case)
示例#2
0
文件: v0_1.py 项目: birdsarah/core-hq
 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'])
示例#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'])