summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2025-05-23 13:29:57 +0000
committerMagnus Hagander2025-05-23 13:33:39 +0000
commit32da6f9cdeee9b41b3e2ee3aed31f78e8fea149d (patch)
tree2859a04f74df81c835b03b13968333beccb0b873
parentc70a0a5893c943e95333b39324b8068a865bfb91 (diff)
Sync dates for reg and sponsorship open form with list
In the list of open sponsorships we stopped listing sponsors once the conference was started. But if one had saved away the URL for the signup form it still worked. Make those two be in sync. For registrations there were some places that would still list it and others wouldn't, but the form would still work. So make the same fix here, except trigger it on the *end* date of the conference so walk-up registrations still work.
-rw-r--r--postgresqleu/confreg/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/postgresqleu/confreg/models.py b/postgresqleu/confreg/models.py
index 5ceb7970..039efbf8 100644
--- a/postgresqleu/confreg/models.py
+++ b/postgresqleu/confreg/models.py
@@ -302,6 +302,11 @@ class Conference(models.Model):
# Check if the registration is open, including verifying against time range
if not self.registrationopen:
return False
+ # If the whole conference is in the past, registration should also not be open
+ # But we check against the *end* date of the conference, to make sure walk-up
+ # registrations *during* the conference still works.
+ if self.enddate < today_conference():
+ return False
# It's open, but what does the time range say?
if self.registrationtimerange is None:
return True
@@ -321,6 +326,8 @@ class Conference(models.Model):
def IsCallForSponsorsOpen(self):
if not self.callforsponsorsopen:
return False
+ if self.startdate < today_conference():
+ return False
if self.callforsponsorstimerange is None:
return True
return timezone.now() in self.callforsponsorstimerange