mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 13:19:16 -05:00
Merge branch 'recipe_description' of github.com:smilerz/recipes into recipe_description
This commit is contained in:
@@ -71,6 +71,8 @@ class StandardFilterMixin(ViewSetMixin):
|
||||
queryset = queryset.filter(updated_at__gte=updated_at)
|
||||
except FieldError:
|
||||
pass
|
||||
except ValidationError:
|
||||
raise APIException(_('Parameter updated_at incorrectly formatted'))
|
||||
|
||||
limit = self.request.query_params.get('limit', None)
|
||||
random = self.request.query_params.get('random', False)
|
||||
|
||||
@@ -252,7 +252,7 @@ def shopping_list(request, pk=None):
|
||||
if re.match(r'^([0-9])+,([0-9])+[.]*([0-9])*$', r):
|
||||
rid, multiplier = r.split(',')
|
||||
if recipe := Recipe.objects.filter(pk=int(rid)).first():
|
||||
recipes.append({'recipe': recipe.id, 'multiplier': multiplier})
|
||||
recipes.append({'recipe': recipe.id, 'servings': multiplier})
|
||||
|
||||
edit = True if 'edit' in request.GET and request.GET['edit'] == 'true' else False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user