diff --git a/course/views.py b/course/views.py index 859869bbb9b4cdb1812b04fdbc314600fb02bd00..5e470b2e89405b92641fd3e44628407013e5d652 100644 --- a/course/views.py +++ b/course/views.py @@ -1233,7 +1233,6 @@ def grant_exception_stage_3(pctx, participation_id, flow_id, session_id): if due_local_naive is not None: new_grading_rule["due"] = due_local_naive - new_grading_rule["if_completed_before"] = due_local_naive for attr_name in ["credit_percent", "bonus_points", "max_points", "max_points_enforced_cap", "generates_grade"]: diff --git a/tests/test_views.py b/tests/test_views.py index eca683983dae814336f67de70389e96f755d53b5..d52db7cd633c9b937a45f58caf29f2d0c0a74d98 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -1968,10 +1968,7 @@ class GrantExceptionStage3Test(GrantExceptionTestMixin, TestCase): excs.filter( kind=constants.flow_rule_kind.grading).count(), 1) if_completed_before = excs[0].rule.get("if_completed_before") - due_naive = due.replace(tzinfo=None) - self.assertEqual(if_completed_before.date(), due_naive.date()) - self.assertEqual(if_completed_before.hour, due_naive.hour) - self.assertEqual(if_completed_before.minute, due_naive.minute) + self.assertIsNone(if_completed_before) self.assertAddMessageCallCount(1) self.assertAddMessageCalledWith("'Grading' exception granted to ") @@ -2000,12 +1997,7 @@ class GrantExceptionStage3Test(GrantExceptionTestMixin, TestCase): excs.filter( kind=constants.flow_rule_kind.grading).count(), 1) if_completed_before = excs[0].rule.get("if_completed_before") - - # access expiration time will be used - expiration_time_naive = expiration_time.replace(tzinfo=None) - self.assertEqual(if_completed_before.date(), expiration_time_naive.date()) - self.assertEqual(if_completed_before.hour, expiration_time_naive.hour) - self.assertEqual(if_completed_before.minute, expiration_time_naive.minute) + self.assertIsNone(if_completed_before) self.assertAddMessageCallCount(1) self.assertAddMessageCalledWith("'Grading' exception granted to ")