diff --git a/aleksis/apps/chronos/frontend/components/calendar_feeds/details/LessonDetails.vue b/aleksis/apps/chronos/frontend/components/calendar_feeds/details/LessonDetails.vue index 3c48211f95dc43e022dccff838100e43d58ea842..ccfff9c239d8fd984e7768e451d0c3515e6888f8 100644 --- a/aleksis/apps/chronos/frontend/components/calendar_feeds/details/LessonDetails.vue +++ b/aleksis/apps/chronos/frontend/components/calendar_feeds/details/LessonDetails.vue @@ -2,7 +2,8 @@ <base-calendar-feed-details v-bind="$props" :color="currentSubject ? currentSubject.colour_bg : null" - > + without-location + > <template #title> <div :style="{ @@ -232,9 +233,8 @@ export default { return { ...item, amends: this.selectedEvent.meta.id, - // LessonEvent has datetime in UTC & graphql does not like the Z timezone info - datetimeStart: this.selectedEvent.start.toISOString().replace("Z", ""), - datetimeEnd: this.selectedEvent.end.toISOString().replace("Z", ""), + datetimeStart: this.selectedEvent.startDateTime.toISO(), + datetimeEnd: this.selectedEvent.endDateTime.toISO(), }; }, transformPatchData(item) { diff --git a/aleksis/apps/chronos/schema/__init__.py b/aleksis/apps/chronos/schema/__init__.py index 4abeaef132e5bec552c53e1fa385f47205f467e3..86c32376280fa4f6193375282d3727b2226ab0a4 100644 --- a/aleksis/apps/chronos/schema/__init__.py +++ b/aleksis/apps/chronos/schema/__init__.py @@ -73,21 +73,6 @@ class AmendLessonCreateMutation(DjangoCreateMutation): "comment", ) - @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 - - @classmethod - def before_save(cls, root, info, input, obj): - obj.timezone = obj.amends.timezone - return obj - class AmendLessonPatchMutation(DjangoPatchMutation): class Meta: @@ -95,20 +80,6 @@ class AmendLessonPatchMutation(DjangoPatchMutation): permissions = ("chronos.edit_substitution_rule",) only_fields = ("subject", "teachers", "groups", "rooms", "cancelled", "comment") - @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 - - @classmethod - def before_save(cls, root, info, input, id, obj): - obj.timezone = obj.amends.timezone - return obj class TimetableType(graphene.Enum):