From d920b3d0370e9a54a24a02244c8de46e05bb38c3 Mon Sep 17 00:00:00 2001 From: wkr Date: Wed, 2 Nov 2022 17:48:22 +0100 Subject: [PATCH] fix(auto-reply): include start and end dates in the auto-reply period; issue #2512 --- core/admin/mailu/models.py | 4 ++-- towncrier/newsfragments/2512.bugfix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 towncrier/newsfragments/2512.bugfix diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py index f30ef387..48ce8b33 100644 --- a/core/admin/mailu/models.py +++ b/core/admin/mailu/models.py @@ -546,8 +546,8 @@ class User(Base, Email): now = date.today() return ( self.reply_enabled and - self.reply_startdate < now and - self.reply_enddate > now + self.reply_startdate <= now and + self.reply_enddate >= now ) @property diff --git a/towncrier/newsfragments/2512.bugfix b/towncrier/newsfragments/2512.bugfix new file mode 100644 index 00000000..b1b6aa99 --- /dev/null +++ b/towncrier/newsfragments/2512.bugfix @@ -0,0 +1 @@ +Fix: include start and end dates in the auto-reply period \ No newline at end of file