diff --git a/aleksis/apps/chronos/schema/__init__.py b/aleksis/apps/chronos/schema/__init__.py index e89f225e05652228c14f8df091e1542cfe289589..d9194e6718112025b4e41713cd00ff5d043bebf6 100644 --- a/aleksis/apps/chronos/schema/__init__.py +++ b/aleksis/apps/chronos/schema/__init__.py @@ -1,5 +1,3 @@ -from datetime import timezone - import graphene from graphene_django import DjangoObjectType @@ -60,26 +58,6 @@ class LessonEventType(DjangoObjectType): amends = graphene.Field(lambda: LessonEventType, required=False) -class DatetimeTimezoneMixin: - """Handle datetimes for mutations with CalendarEvent objects. - - This is necessary because the client sends timezone information as - ISO string which only includes an offset (+00:00 UTC) and an - offset is not a valid timezone. Instead we set UTC as timezone - here directly. - """ - - @classmethod - def handle_datetime_start(cls, value, name, info) -> int: - value = value.replace(tzinfo=timezone.utc) - return value - - @classmethod - def handle_datetime_end(cls, value, name, info) -> int: - value = value.replace(tzinfo=timezone.utc) - return value - - class AmendLessonBatchCreateMutation(BaseBatchCreateMutation): class Meta: model = LessonEvent