Skip to content

Instantly share code, notes, and snippets.

@almost
Created May 13, 2014 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almost/b9bcbe16ef588b873bee to your computer and use it in GitHub Desktop.
Save almost/b9bcbe16ef588b873bee to your computer and use it in GitHub Desktop.
item_ids = request.QUERY_PARAMS.get('item_models', '').split(',')
items = ItemModel.objects.filter(id__in=item_ids)
result = dict(
(m.pk, {'lowest_stock': m.get_lowest_stock_for_subbooking(subbooking)})
for m in items}
return Response(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment