diff --git a/website/registrations/forms.py b/website/registrations/forms.py
index e3602906c..792ee57a8 100644
--- a/website/registrations/forms.py
+++ b/website/registrations/forms.py
@@ -243,6 +243,7 @@ def clean(self):
if (
self.cleaned_data["member"].latest_membership
and self.cleaned_data["member"].latest_membership.study_long
+ and self.cleaned_data["membership_type"] != Membership.BENEFACTOR
):
raise ValidationError("It's not possible to renew a study long membership.")
diff --git a/website/registrations/services.py b/website/registrations/services.py
index 783515b64..7d539af1c 100644
--- a/website/registrations/services.py
+++ b/website/registrations/services.py
@@ -254,12 +254,12 @@ def complete_renewal(renewal: Renewal):
latest_membership = member.latest_membership
current_membership = member.current_membership
- if (latest_membership and latest_membership.study_long) or (
- current_membership
- and (current_membership.study_long or current_membership.until is None)
- and not renewal.membership_type == Membership.BENEFACTOR
- ):
- raise ValueError("This member already has a never ending membership")
+ if (
+ latest_membership
+ and latest_membership.study_long
+ and renewal.membership_type != Membership.BENEFACTOR
+ ) or (current_membership and current_membership.until is None):
+ raise ValueError("This member already has a never ending membership.")
until = timezone.datetime(year=lecture_year + 1, month=9, day=1).date()
with transaction.atomic():
if renewal.length == Renewal.MEMBERSHIP_STUDY:
diff --git a/website/registrations/templates/registrations/renewal.html b/website/registrations/templates/registrations/renewal.html
index 360ab5988..7d1e14fcd 100644
--- a/website/registrations/templates/registrations/renewal.html
+++ b/website/registrations/templates/registrations/renewal.html
@@ -129,11 +129,6 @@
{% trans "Membership history" %}
have to renew your membership.
{% endblocktrans %}
- {% elif latest_membership.study_long %}
-
- You seem to be on the wrong page for your membership type.
- follow this link to renew your membership.
-
{% elif not request.member.profile.is_minimized %}
{% for error in form.errors.items %}
{% for message in error.1 %}
@@ -144,11 +139,19 @@