Skip to content

Commit

Permalink
update validation for donate_to_entity
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyq committed Apr 16, 2024
1 parent 536fb4b commit aeeeefe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tendenci/apps/corporate_memberships/forms.py
Expand Up @@ -792,7 +792,8 @@ def clean(self):
_("You've selected {count} individual members, but the maximum allowed is {cap}.".format(count=count_members, cap=cmt.membership_cap)) )

if 'donation_option_value' in self.cleaned_data \
and 'donate_to_entity' in self.cleaned_data:
and 'donate_to_entity' in self.cleaned_data \
and self.cleaned_data['donation_option_value'] != ['', '']:
if not self.cleaned_data['donate_to_entity']:
raise forms.ValidationError({'donate_to_entity': _("Please select where we should allocate your donation.")
})
Expand Down

0 comments on commit aeeeefe

Please sign in to comment.