Skip to content

Commit

Permalink
fix teacher/eighth error
Browse files Browse the repository at this point in the history
  • Loading branch information
pefoley2 committed Sep 16, 2016
1 parent 494433a commit 117bec0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion intranet/apps/users/models.py
Expand Up @@ -545,7 +545,10 @@ def _current_user_override(self):
information regardless of their privacy settings."""
try:
# threadlocals is a module, not an actual thread locals object
requesting_user = threadlocals.request().user
request = threadlocals.request()
if request is None:
return False
requesting_user = request.user
if isinstance(requesting_user, AnonymousUser) or not requesting_user.is_authenticated:
return False
can_view_anyway = requesting_user and (requesting_user.is_teacher or requesting_user.is_eighthoffice or requesting_user.is_eighth_admin)
Expand Down

0 comments on commit 117bec0

Please sign in to comment.