Skip to content
Snippets Groups Projects
Commit 47edcb1a authored by Julian's avatar Julian
Browse files

Add typeannotations to mutation parameters

parent 9f8c35f9
No related branches found
No related tags found
1 merge request!392Resolve "Absence creation form should support datetimes"
import datetime
from typing import List
from django.core.exceptions import PermissionDenied
import graphene
......@@ -21,7 +24,16 @@ class AbsencesForPersonsCreateMutation(graphene.Mutation):
participation_statuses = graphene.List(ParticipationStatusType)
@classmethod
def mutate(cls, root, info, persons, start, end, comment, reason): # noqa
def mutate(
cls,
root,
info,
persons: List[str | int],
start: datetime.datetime,
end: datetime.datetime,
comment: str,
reason: str | int,
):
participation_statuses = []
persons = Person.objects.filter(pk__in=persons)
......
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