Skip to content

Commit

Permalink
Merge branch 'master' into asaeed/ENT-7715
Browse files Browse the repository at this point in the history
  • Loading branch information
justEhmadSaeed authored Oct 23, 2023
2 parents cc96193 + b8dfb34 commit 4064874
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions integrated_channels/degreed2/exporters/learner_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,22 @@ def get_learner_data_records(
f'percent_grade={percent_grade}, degreed_completed_timestamp={degreed_completed_timestamp}'
f'completed_date={completed_date}, course_completed={course_completed}'
))
if enterprise_enrollment.enterprise_customer_user.get_remote_id(
self.enterprise_configuration.idp_id
) is not None:
LOGGER.info(generate_formatted_log(
try:
remote_id = enterprise_enrollment.enterprise_customer_user.get_remote_id(
self.enterprise_configuration.idp_id
)
except Exception as e: # pylint: disable=broad-except
LOGGER.error(generate_formatted_log(
self.enterprise_configuration.channel_code(),
enterprise_enrollment.enterprise_customer_user.enterprise_customer.uuid,
enterprise_enrollment.enterprise_customer_user.user_id,
enterprise_enrollment.course_id,
'[Degreed2Client] - Found remote id:'
f'percent_grade={percent_grade}, degreed_completed_timestamp={degreed_completed_timestamp}'
f'completed_date={completed_date}, course_completed={course_completed}'
f'course_id={get_course_id_for_enrollment(enterprise_enrollment)}'
'[Degreed2Client] get_learner_data_records failed, possibly due to an invalid customer configuration. '
f'Error: {e}'
))
return None

if remote_id is not None:
Degreed2LearnerDataTransmissionAudit = apps.get_model(
'degreed2',
'Degreed2LearnerDataTransmissionAudit'
Expand Down

0 comments on commit 4064874

Please sign in to comment.