Skip to content
Snippets Groups Projects
Verified Commit 5b444ff9 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Update dashboard views to use person model instead of user model

parent ece7161e
No related branches found
No related tags found
1 merge request!100Resolve "Dashboard"
Pipeline #548 failed
...@@ -23,14 +23,14 @@ from .util import messages ...@@ -23,14 +23,14 @@ from .util import messages
def index(request: HttpRequest) -> HttpResponse: def index(request: HttpRequest) -> HttpResponse:
context = {} context = {}
activities = Activity.objects.filter(user=request.user).order_by("-created_at")[:5] activities = Activity.objects.filter(user=request.user.person).order_by("-created_at")[:5]
notifications = ( notifications = (
request.user.notifications.all().filter(user=request.user).order_by("-created_at")[:5] request.user.person.notifications.all().filter(user=request.user.person).order_by("-created_at")[:5]
) )
unread_notifications = ( unread_notifications = (
request.user.notifications.all() request.user.person.notifications.all()
.filter(user=request.user, read=False) .filter(user=request.user.person, read=False)
.order_by("-created_at") .order_by("-created_at")
) )
......
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