MIGRATION: dav_registration: try to incoorporate feedback from trainers
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import datetime
|
||||
import logging
|
||||
import uuid
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
@@ -21,6 +22,7 @@ one_day = datetime.timedelta(1)
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Registration(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
event = models.ForeignKey(Event, related_name='registrations')
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
@@ -108,7 +110,7 @@ class Registration(models.Model):
|
||||
elif event.last_day:
|
||||
last_day = event.last_day
|
||||
elif event.alt_first_day:
|
||||
last_day = event.alt_fisrt_day
|
||||
last_day = event.alt_first_day
|
||||
else:
|
||||
last_day = event.first_day
|
||||
return timezone.make_aware(datetime.datetime.combine(last_day + one_day * 7, midnight))
|
||||
|
||||
Reference in New Issue
Block a user