From 169c846cdbc778dfa980fb6d2d7f90036e3b4d83 Mon Sep 17 00:00:00 2001 From: Felix Zett Date: Mon, 15 Sep 2025 22:25:50 +0200 Subject: [PATCH] feat: require all mandatory tags to be selected --- backend/crud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/crud.py b/backend/crud.py index d592091..296e482 100644 --- a/backend/crud.py +++ b/backend/crud.py @@ -67,8 +67,8 @@ def items_for_trip(db: Session, user_id: UUID_t, trip: models.Trip, selected_tag if not item_tag_ids: result.append(it) elif mandatory_tag_ids: - # Only include if at least one mandatory tag is selected - if selected_set & mandatory_tag_ids: + # Nur aufnehmen, wenn ALLE mandatory tags ausgewählt sind + if mandatory_tag_ids <= selected_set: result.append(it) elif selected_set & item_tag_ids: result.append(it)