Commit 75399a18 authored by Joren Vrancken's avatar Joren Vrancken

Merge branch 'add-doc-events' into 'master'

Add comment to is_late_cancellation

See merge request !189
parents f3870be6 e08b3894
......@@ -315,6 +315,12 @@ class Registration(models.Model):
return bool(self.name)
def is_late_cancellation(self):
# First check whether or not the user cancelled
# If the user cancelled then check if this was after the deadline
# And do a complex check to calculate if this user was on
# the waiting list at the time of cancellation, since
# you shouldn't need to pay the costs of something
# you weren't even able to go to.
return (self.date_cancelled and
self.date_cancelled > self.event.cancel_deadline and
self.event.registration_set.filter(
......
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