Skip to content
Snippets Groups Projects
Unverified Commit e1d2169f authored by Matthew Piatetsky's avatar Matthew Piatetsky Committed by GitHub
Browse files

Merge pull request #18977 from edx/prevent_activation_time_error

prevent activation time error
parents 57117901 f738e74e
No related branches found
No related tags found
No related merge requests found
......@@ -288,7 +288,7 @@ class UserCourseEnrollmentsList(generics.ListAPIView):
courses_excluded_from_mobile = json.loads(courses_excluded_from_mobile.replace('\r', '').replace('\n', ''))
if enrollment.mode == 'audit' and str(course_key) in courses_excluded_from_mobile.keys():
activationTime = dateparse.parse_datetime(courses_excluded_from_mobile[str(course_key)])
if enrollment.created > activationTime:
if activationTime and enrollment.created and enrollment.created > activationTime:
return True
except (ExperimentKeyValue.DoesNotExist, AttributeError):
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment