Commit 10e834bd authored by Joren Vrancken's avatar Joren Vrancken
Browse files

Merge branch 'fix/registrations-renewal-start-date' into 'master'

Fix renewal since date calculation

See merge request !899
parents 9dc3542b 35846c87
"""The services defined by the registrations package"""
import string
import unicodedata
from datetime import timedelta
from django.conf import settings
from django.contrib.auth import get_user_model
......@@ -265,7 +264,7 @@ def _create_membership_from_entry(entry, member=None):
if membership.until is None:
raise ValueError('This member already has a never ending '
since = membership.until + timedelta(days=1)
since = membership.until
except Renewal.DoesNotExist:
until = timezone.datetime(year=lecture_year + 1,
......@@ -403,7 +403,7 @@ class ServicesTest(TestCase):
self.e3.length = Entry.MEMBERSHIP_YEAR
membership3 = services._create_membership_from_entry(self.e3)
existing_membership.until + timedelta(days=1))
self.assertEqual(membership3.until, timezone.datetime(
year=2017, month=9, day=1).date())
self.assertEqual(membership3.user, self.e3.member)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment