Skip to content

Commit

Permalink
fix recipe in item search
Browse files Browse the repository at this point in the history
  • Loading branch information
stelzo committed Dec 7, 2024
1 parent aac871e commit 05f0fc1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,12 @@ func SearchItems(itemType string, all bool, w http.ResponseWriter, r *http.Reque
if all {
typedItems = append(typedItems, RenderTypedItemListEntry(item, lang))
} else {
items = append(items, RenderItemListEntry(item, lang))
itemRendered := RenderItemListEntry(item, lang)
recipe, exists := GetRecipeIfExists(itemRendered.Id, txn)
if exists {
itemRendered.Recipe = RenderRecipe(recipe, Db)
}
items = append(items, itemRendered)
}
}

Expand Down

0 comments on commit 05f0fc1

Please sign in to comment.