fixed keywords and food/unit loading

This commit is contained in:
vabene1111
2020-06-29 22:41:54 +02:00
parent 29e2f9ee15
commit 6eb41fe33f
3 changed files with 9 additions and 7 deletions

View File

@@ -66,7 +66,7 @@
:hide-selected="true"
:preserve-search="true"
placeholder="{% trans 'Select Keywords' %}"
label="name"
label="label"
track-by="id"
id="id_keywords"
:multiple="true"
@@ -409,7 +409,7 @@
if (this.recipe !== undefined) {
for (let s of this.recipe.steps) {
for (let i of s.ingredients) {
if (i.unit.id === undefined) {
if (i.unit !== undefined &&i.unit.id === undefined) {
this.units.push(i.unit)
}
}
@@ -428,7 +428,7 @@
if (this.recipe !== undefined) {
for (let s of this.recipe.steps) {
for (let i of s.ingredients) {
if (i.food.id === undefined) {
if (i.food !== undefined &&i.food.id === undefined) {
this.foods.push(i.food)
}
}