Skip to content

Commit

Permalink
Fix benefactorers can have membership until end of study
Browse files Browse the repository at this point in the history
  • Loading branch information
T8902 committed Nov 13, 2024
1 parent 3017fbf commit 7586b51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/members/models/membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.utils.translation import pgettext_lazy

from utils.snippets import overlaps


Expand Down Expand Up @@ -82,6 +81,11 @@ def clean(self):
if self.type != self.HONORARY and self.until is None:
errors.update({"until": "A non-honorary membership must have an end date."})

if self.type == self.BENEFACTOR and self.study_long:
errors.update(
{"study_long": "Benefactors cannot have a study long membership."}
)

if errors:
raise ValidationError(errors)

Expand Down

0 comments on commit 7586b51

Please sign in to comment.