mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-07 23:28:16 -05:00
fix that does not really fix anything
see #453/454
This commit is contained in:
@@ -542,6 +542,7 @@
|
|||||||
this.loadShoppingList()
|
this.loadShoppingList()
|
||||||
|
|
||||||
{% if recipes %}
|
{% if recipes %}
|
||||||
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.edit_mode = true
|
this.edit_mode = true
|
||||||
let loadingRecipes = []
|
let loadingRecipes = []
|
||||||
@@ -605,6 +606,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadInitialRecipe: function (recipe, servings) {
|
loadInitialRecipe: function (recipe, servings) {
|
||||||
|
servings = 1 //TODO temporary until i can actually fix the servings for this #453
|
||||||
return this.$http.get('{% url 'api:recipe-detail' 123456 %}'.replace('123456', recipe)).then((response) => {
|
return this.$http.get('{% url 'api:recipe-detail' 123456 %}'.replace('123456', recipe)).then((response) => {
|
||||||
this.addRecipeToList(response.data, servings)
|
this.addRecipeToList(response.data, servings)
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ def shopping_list(request, pk=None):
|
|||||||
if re.match(r'^([0-9])+,([0-9])+[.]*([0-9])*$', r):
|
if re.match(r'^([0-9])+,([0-9])+[.]*([0-9])*$', r):
|
||||||
rid, multiplier = r.split(',')
|
rid, multiplier = r.split(',')
|
||||||
if recipe := Recipe.objects.filter(pk=int(rid)).first():
|
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
|
edit = True if 'edit' in request.GET and request.GET['edit'] == 'true' else False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user