From 093ea0185b4a280b9d473baf1d0ec53d2fce847c Mon Sep 17 00:00:00 2001 From: Andreas Maierhofer Date: Fri, 10 Jan 2025 14:46:02 +0100 Subject: [PATCH] Adjust sektion signup for core changes see hitobito/hitobito#95aa280 --- app/models/wizards/signup/sektion_wizard.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/wizards/signup/sektion_wizard.rb b/app/models/wizards/signup/sektion_wizard.rb index acf772379..ed5176c28 100644 --- a/app/models/wizards/signup/sektion_wizard.rb +++ b/app/models/wizards/signup/sektion_wizard.rb @@ -37,10 +37,6 @@ def save! valid? && operations.all?(&:save!) end - def valid? - super && operations_valid? - end - def birthdays read_birthdays end @@ -55,6 +51,10 @@ def fees_for(beitragskategorie) private + # As we might save multiple people we delegate validation to operations + # person itself can be invalid as operation handles aspects (e.g role start_on and gender I18nEnum::NIL_KEY) + def person_valid? = operations_valid? + def beitragskategorie value = if birthdays.none? :unknown