From e846e127b3151ccc5364bb173af0e79303151839 Mon Sep 17 00:00:00 2001 From: Victoria Earl Date: Thu, 14 Sep 2023 12:31:54 -0400 Subject: [PATCH] Fix requested depts Changed my mind about requiring this field as I realized that it won't list all the departments. Also removes coercing to int because department IDs aren't ints, duh. --- uber/forms/attendee.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/uber/forms/attendee.py b/uber/forms/attendee.py index 2f8461a6f..c7bc92c57 100644 --- a/uber/forms/attendee.py +++ b/uber/forms/attendee.py @@ -243,7 +243,7 @@ class OtherInfo(MagForm): placeholder = BooleanField(widget=HiddenInput()) staffing = BooleanField('I am interested in volunteering!', widget=SwitchInput(), description=popup_link(c.VOLUNTEER_PERKS_URL, "What do I get for volunteering?")) - requested_depts_ids = SelectMultipleField('Where do you want to help?', coerce=int, widget=MultiCheckbox()) # TODO: Show attendees department descriptions + requested_depts_ids = SelectMultipleField('Where do you want to help?', widget=MultiCheckbox()) # TODO: Show attendees department descriptions requested_accessibility_services = BooleanField(f'I would like to be contacted by the {c.EVENT_NAME} Accessibility Services department prior to the event and I understand my contact information will be shared with Accessibility Services for this purpose.', widget=SwitchInput()) interests = SelectMultipleField('What interests you?', choices=c.INTEREST_OPTS, coerce=int, validators=[validators.Optional()], widget=MultiCheckbox()) @@ -265,11 +265,6 @@ def get_non_admin_locked_fields(self, attendee): return locked_fields - @field_validation.requested_depts_ids - def select_requested_depts(form, field): - if form.staffing.data and not field.data and len(c.PUBLIC_DEPARTMENT_OPTS_WITH_DESC) > 1: - raise ValidationError('Please select the department(s) you would like to work for, or "Anything".') - class PreregOtherInfo(OtherInfo): new_or_changed_validation = CustomValidation()