-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: catch a possible exception in beta course configuration #36172
base: master
Are you sure you want to change the base?
fix: catch a possible exception in beta course configuration #36172
Conversation
when the learner is a beta tester, and the beta test has been set up with a large duration, the courseware djangoapp can return an overflow error on a timedelta call. In those circumstances, this defaults to returning an unmodified date. FIXES: APER-3848
removing an unused import
@@ -93,7 +95,7 @@ def enterprise_learner_enrolled(request, user, course_key): | |||
# enterprise_customer_data is either None (if learner is not linked to any customer) or a serialized | |||
# EnterpriseCustomer representing the learner's active linked customer. | |||
enterprise_customer_data = enterprise_customer_from_session_or_learner_data(request) | |||
learner_portal_enabled = enterprise_customer_data and enterprise_customer_data['enable_learner_portal'] | |||
learner_portal_enabled = enterprise_customer_data and enterprise_customer_data["enable_learner_portal"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of the changes in this file from this line down are just because I let my IDE autolint the file to our current standards. Usually I wouldn't commit an autoformat at the same time as an actual code change, but because the code change is just that one tiny block above, and the autoformat isn't extreme, it seemed like a legitimate choice. I can undo if reviewers prefer.
adjusted_date = adjust_start_date(user, days_early_for_beta, start, course_key) | ||
self.assertEqual(expected, adjusted_date) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above – from here on down it is just autoformatting. Again, I can undo it and just put in the individual changes the reviewers think it is too excessive.
Description
when the learner is a beta tester, and the beta test has been set up with an extremely large duration, the courseware djangoapp can return an overflow error on a timedelta call. In those circumstances, this defaults to returning an unmodified date.
FIXES: APER-3848