feat: Change override date to datetime

When first building the Certificate Date Override feature, I set up the
CertificateDateOverride model to store the override dates as Dates
instead of DateTimes.

Turns out this is not how edX typically handles dates, and it’s causing
some minor headaches around needing to convert values. Also, using just
Dates causes timezone issues.

MICROBA-1488
This commit is contained in:
oliviaruizknott
2021-09-10 08:11:50 -06:00
parent 48ad7effb1
commit 59fefa10eb
5 changed files with 32 additions and 10 deletions

View File

@@ -587,7 +587,7 @@ class AwardCourseCertificatesTestCase(CredentialsApiConfigMixin, TestCase):
assert call_args[1] == self.student.username
assert call_args[2] == self.certificate
assert call_args[3] == self.certificate.modified_date
assert call_args[4] == self.certificate.date_override.date.date()
assert call_args[4] == self.certificate.date_override.date
def test_award_course_cert_not_called_if_disabled(self, mock_post_course_certificate):
"""