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