Skip to content
Snippets Groups Projects
Commit 11fd7e05 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix amends field of LessonEvent in gql schema

parent a9cdcdd5
No related branches found
No related tags found
1 merge request!310Resolve "Implement Vue substitution frontend"
Pipeline #175514 failed
......@@ -35,15 +35,6 @@ class TimetableRoomType(DjangoObjectType):
skip_registry = True
# There is another unrelated CalendarEventType in aleksis/core/schema/calendar
# This CalendarEventType is needed for the inherited amends field of LessonEvent
# to work in the graphql query.
class CalendarEventForLessonEventType(DjangoObjectType):
class Meta:
model = CalendarEvent
fields = ("id", "amends", "datetime_start", "datetime_end")
class LessonEventType(DjangoObjectType):
class Meta:
model = LessonEvent
......@@ -63,6 +54,8 @@ class LessonEventType(DjangoObjectType):
"id": ["exact", "lte", "gte"],
}
amends = graphene.Field(lambda: LessonEventType, required=False)
class DatetimeTimezoneMixin:
"""Handle datetimes for mutations with CalendarEvent objects.
......
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