From b75f8b0ed1676b493b37219971c742b7695d7abd Mon Sep 17 00:00:00 2001 From: Deborah Kaplan Date: Tue, 30 Jan 2024 21:34:56 +0000 Subject: [PATCH] feat: tweaks from code review wording, switching to using a constant, fixing a string concat FIXES: APER-3146 --- openedx/core/djangoapps/programs/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/programs/tasks.py b/openedx/core/djangoapps/programs/tasks.py index db60103e4f..c8855ba4f4 100644 --- a/openedx/core/djangoapps/programs/tasks.py +++ b/openedx/core/djangoapps/programs/tasks.py @@ -87,7 +87,7 @@ def get_certified_programs(student: User, raise_on_error: bool = False) -> List[ student: User object representing the student Keyword Arguments: - raise_on_error (bool): Reraise errors back to the caller, instead if returning empty results. + raise_on_error (bool): Reraise errors back to the caller, instead of returning empty results. Returns: str[]: UUIDs of the programs for which the student has been awarded a certificate @@ -96,7 +96,7 @@ def get_certified_programs(student: User, raise_on_error: bool = False) -> List[ certified_programs = [] for credential in get_credentials( student, - credential_type="program", + credential_type=PROGRAM_CERTIFICATE, raise_on_error=raise_on_error, ): certified_programs.append(credential["credential"]["program_uuid"]) @@ -244,7 +244,7 @@ def award_program_certificates(self, username): # lint-amnesty, pylint: disable if exc.response.status_code == 404: LOGGER.exception( f"Certificate for program {program_uuid} could not be found. " - + f"Unable to award certificate to user {username}. The program might not be configured." + f"Unable to award certificate to user {username}. The program might not be configured." ) elif exc.response.status_code == 429: rate_limit_countdown = 60