From e15cc9ac12a5bb260c60698e9debc96241719778 Mon Sep 17 00:00:00 2001 From: oliviaruizknott Date: Thu, 19 Aug 2021 13:23:25 -0600 Subject: [PATCH] fix: Change format of date_override post Credentials needs the course certificate date override data in a slightly different format than we were passing it before. Fix! --- openedx/core/djangoapps/programs/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/programs/tasks.py b/openedx/core/djangoapps/programs/tasks.py index 179f660384..8c84c7fa1e 100644 --- a/openedx/core/djangoapps/programs/tasks.py +++ b/openedx/core/djangoapps/programs/tasks.py @@ -33,6 +33,7 @@ MAX_RETRIES = 11 PROGRAM_CERTIFICATE = 'program' COURSE_CERTIFICATE = 'course-run' VISIBLE_DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' +DATE_OVERRIDE_FORMAT = '%Y-%m-%d' def get_completed_programs(site, student): @@ -306,7 +307,7 @@ def post_course_certificate(client, username, certificate, visible_date, date_ov 'mode': certificate.mode, 'type': COURSE_CERTIFICATE, }, - 'date_override': date_override.strftime(VISIBLE_DATE_FORMAT) if date_override else None, + 'date_override': {'date': date_override.strftime(DATE_OVERRIDE_FORMAT)} if date_override else None, 'attributes': [ { 'name': 'visible_date',