Update web/core/models_ann.py

This commit is contained in:
Joshua Laymon 2025-08-30 22:21:08 +00:00
parent 44ace418c7
commit 21807d1530

View File

@ -20,14 +20,7 @@ class Announcement(models.Model):
return self.title or f"Announcement #{self.pk}"
def is_current(self):
now = timezone.now()
if not self.is_active:
return False
if self.start_at and now < self.start_at:
return False
if self.end_at and now > self.end_at:
return False
return True
return bool(self.is_active)
class AnnouncementDismissal(models.Model):