From 87e90a54870dd7b633ba34f0ebfb7fcdf03d7815 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Tue, 4 Aug 2020 19:12:44 +0200
Subject: [PATCH] Fix wrong used pk

---
 aleksis/apps/alsijil/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/apps/alsijil/views.py b/aleksis/apps/alsijil/views.py
index 6e09bc743..2bfa92edf 100644
--- a/aleksis/apps/alsijil/views.py
+++ b/aleksis/apps/alsijil/views.py
@@ -226,7 +226,7 @@ def week_view(
         persons_qs = Person.objects.filter(is_active=True)
 
         if not request.user.has_perm("alsijil.view_week_personalnote", instance):
-            persons_qs = persons_qs.filter(pk=request.user.pk)
+            persons_qs = persons_qs.filter(pk=request.user.person.pk)
         elif group:
             persons_qs = persons_qs.filter(member_of=group)
         else:
-- 
GitLab