From 7bf3caadd26c2f7051e81d035095bda7224edbae Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Wed, 13 Dec 2023 16:33:33 +0000 Subject: [PATCH] Revert "Hard-code the minimum TaskDone created_before date" This reverts commit 43068d542b568a74f9586f17c843ddbb39d441e8. --- lms/tasks/email_digests.py | 3 --- tests/unit/lms/tasks/email_digests_test.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lms/tasks/email_digests.py b/lms/tasks/email_digests.py index 2783422670..07263239e3 100644 --- a/lms/tasks/email_digests.py +++ b/lms/tasks/email_digests.py @@ -162,9 +162,6 @@ def send_instructor_email_digest( tzinfo=timezone.utc ), created_after.replace(tzinfo=timezone.utc), - # Don't count annotations from before we deployed https://github.com/hypothesis/lms/pull/5904. - # This line can safely be removed on Weds 20th Dec 2023 or later. - datetime(year=2023, month=12, day=13, hour=5, tzinfo=timezone.utc), ) digest_service = request.find_service(DigestService) diff --git a/tests/unit/lms/tasks/email_digests_test.py b/tests/unit/lms/tasks/email_digests_test.py index 45395ae03a..f4d5a0a122 100644 --- a/tests/unit/lms/tasks/email_digests_test.py +++ b/tests/unit/lms/tasks/email_digests_test.py @@ -345,7 +345,7 @@ def h_userid(self): @pytest.fixture def created_before(self): """Return the created_before arg that will be passed to send_instructor_email_digest().""" - return datetime(year=2023, month=12, day=25, hour=5, tzinfo=timezone.utc) + return datetime.now(timezone.utc) @pytest.fixture def make_task_done(self, h_userid, created_before):