fix(json-parsing): wrong itemId
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

Fixed that the wrong id was checked for the bar
This commit is contained in:
nikurasu 2024-05-27 18:53:50 +02:00
parent beeb22dc42
commit 2e5993abe7
Signed by: Nikurasu
GPG key ID: 9E7F14C03EF1F271

View file

@ -241,7 +241,7 @@ func GetAttendiesFromPretixJsonWithSeperateSubProducts(pretixEvent *entities.Pre
if event.ItemIdBar == nil { if event.ItemIdBar == nil {
attendie.AttendsBar = false attendie.AttendsBar = false
} else { } 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 { if indexBar != -1 {
attendie.AttendsBar = true attendie.AttendsBar = true
} else { } else {