From 2e5993abe7a57d56fafe27a607ebfcde865e42ce Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 27 May 2024 18:53:50 +0200 Subject: [PATCH] fix(json-parsing): wrong itemId Fixed that the wrong id was checked for the bar --- src/app/util/pretix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/util/pretix.go b/src/app/util/pretix.go index 956ee73..c2cbfa6 100644 --- a/src/app/util/pretix.go +++ b/src/app/util/pretix.go @@ -241,7 +241,7 @@ func GetAttendiesFromPretixJsonWithSeperateSubProducts(pretixEvent *entities.Pre if event.ItemIdBar == nil { attendie.AttendsBar = false } else { - indexBar := slices.IndexFunc(order.Positions, func(p entities.Pretix_Position) bool { return p.Item == *event.ItemIdRestaurant }) + indexBar := slices.IndexFunc(order.Positions, func(p entities.Pretix_Position) bool { return p.Item == *event.ItemIdBar }) if indexBar != -1 { attendie.AttendsBar = true } else {