Skip to content

Commit

Permalink
fix keyerror with request.session (openedx#24642)
Browse files Browse the repository at this point in the history
* fix keyerror with request.session

* improve the conditional
  • Loading branch information
adamstankiewicz authored Jul 30, 2020
1 parent 0fb92e1 commit 00f4ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openedx/features/enterprise_support/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def get_enterprise_learner_portal_enabled_message(request):
Args:
request: request made to the LMS dashboard
"""
if request.session['enterprise_customer']:
if 'enterprise_customer' in request.session and request.session['enterprise_customer']:
enterprise_customer = request.session['enterprise_customer']
else:
learner_data = get_enterprise_learner_data(request.user)
Expand Down

0 comments on commit 00f4ea3

Please sign in to comment.