mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 13:19:16 -05:00
fix duplicate shopping recipes when auto-add enabled
This commit is contained in:
@@ -12,6 +12,7 @@ from django.contrib.auth.models import Group
|
|||||||
from django.contrib.auth.password_validation import validate_password
|
from django.contrib.auth.password_validation import validate_password
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db.models import Avg, Q, Sum
|
from django.db.models import Avg, Q, Sum
|
||||||
|
from django.db.models.functions import Lower
|
||||||
from django.http import HttpResponseRedirect, JsonResponse
|
from django.http import HttpResponseRedirect, JsonResponse
|
||||||
from django.shortcuts import get_object_or_404, redirect, render
|
from django.shortcuts import get_object_or_404, redirect, render
|
||||||
from django.urls import reverse, reverse_lazy
|
from django.urls import reverse, reverse_lazy
|
||||||
|
|||||||
@@ -207,8 +207,7 @@ export default {
|
|||||||
if (!cancel) {
|
if (!cancel) {
|
||||||
console.log("saving", { ...this.mealplan_settings, ...this.entryEditing })
|
console.log("saving", { ...this.mealplan_settings, ...this.entryEditing })
|
||||||
this.$bvModal.hide(`edit-modal`)
|
this.$bvModal.hide(`edit-modal`)
|
||||||
this.$emit("save-entry", { ...this.mealplan_settings, ...this.entryEditing })
|
this.$emit("save-entry", { ...this.mealplan_settings, ...this.entryEditing, ...{ addshopping: this.entryEditing.addshopping && !this.autoMealPlan } })
|
||||||
console.log("after emit", { ...this.mealplan_settings, ...this.entryEditing }.addshopping)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteEntry() {
|
deleteEntry() {
|
||||||
|
|||||||
Reference in New Issue
Block a user