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

Also filter personal notes on statistics page

parent 454d3e3b
No related branches found
No related tags found
1 merge request!361Resolve "Add statistics page for absences"
Pipeline #193623 failed
......@@ -285,7 +285,14 @@ class Query(graphene.ObjectType):
person = Person.objects.get(pk=person)
if not info.context.user.has_perm("alsijil.view_person_statistics_rule", person):
return []
return NewPersonalNote.objects.filter(person=person)
school_term = SchoolTerm.objects.get(id=term)
return NewPersonalNote.objects.filter(
person=person,
documentation__in=Documentation.objects.filter(
datetime_start__date__gte=school_term.date_start,
datetime_end__date__lte=school_term.date_end,
),
)
@staticmethod
def resolve_statistics_by_group(root, info, group, term=None):
......
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