Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 30, 2023
1 parent 9370f4a commit e86889b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion impostor/templatetags/impostor_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""template tags for impostor."""

from django import template

from impostor.models import ImpostorLog

register = template.Library()
Expand All @@ -14,7 +15,9 @@ def get_impersonated_as(request):
:return:
"""
try:
impersonated_as = ImpostorLog.objects.get(token=request.session['impostor_token'])
impersonated_as = ImpostorLog.objects.get(
token=request.session["impostor_token"]
)
except (ImpostorLog.DoesNotExist, KeyError):
impersonated_as = None

Expand Down

0 comments on commit e86889b

Please sign in to comment.