mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-20 09:40:16 -04:00
fix: fix assertionerror
This commit is contained in:
parent
13db62b837
commit
be0c82bcef
|
@ -10,16 +10,13 @@ from django.views.generic import CreateView, DeleteView, UpdateView
|
||||||
from tjdests.apps.authentication.decorators import require_accept_tos
|
from tjdests.apps.authentication.decorators import require_accept_tos
|
||||||
from tjdests.apps.destinations.models import Decision, TestScore
|
from tjdests.apps.destinations.models import Decision, TestScore
|
||||||
|
|
||||||
from ..authentication.models import User
|
|
||||||
from .forms import ProfilePublishForm
|
from .forms import ProfilePublishForm
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@require_accept_tos
|
@require_accept_tos
|
||||||
def profile_view(request: HttpRequest):
|
def profile_view(request: HttpRequest):
|
||||||
assert request.user is User
|
# mypy is annoying.
|
||||||
|
|
||||||
# mypy is bad.
|
|
||||||
test_scores = TestScore.objects.filter(user=request.user) # type: ignore
|
test_scores = TestScore.objects.filter(user=request.user) # type: ignore
|
||||||
decisions = Decision.objects.filter(user=request.user) # type: ignore
|
decisions = Decision.objects.filter(user=request.user) # type: ignore
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user