Skip to content
Snippets Groups Projects
Commit 3c2a4aa0 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch...

Merge branch '241-substitution-planning-cancelled-checkbox-does-not-have-false-as-value-when-unchecked-actively' into 'master'

Resolve "substitution planning "cancelled" checkbox does not have false as value when unchecked actively"

Closes #241

See merge request !357
parents 24e0a5e7 c48408c0
No related branches found
No related tags found
1 merge request!357Resolve "substitution planning "cancelled" checkbox does not have false as value when unchecked actively"
Pipeline #192196 canceled
......@@ -159,10 +159,13 @@ export default {
amends: this.selectedEvent.meta.id,
datetimeStart: this.selectedEvent.startDateTime.toUTC().toISO(),
datetimeEnd: this.selectedEvent.endDateTime.toUTC().toISO(),
// Normalize cancelled, v-checkbox returns null & does not
// honor false-value.
cancelled: item.cancelled ? true : false,
};
},
transformPatchData(item) {
let { id, __typename, cancelled, ...patchItem } = item;
let { __typename, cancelled, ...patchItem } = item;
return {
...patchItem,
// Normalize cancelled, v-checkbox returns null & does not
......
......@@ -107,7 +107,7 @@ class AmendLessonBatchPatchMutation(DatetimeTimezoneMixin, DjangoBatchPatchMutat
class Meta:
model = LessonEvent
permissions = ("chronos.edit_substitution_rule",)
only_fields = ("subject", "teachers", "groups", "rooms", "cancelled", "comment")
only_fields = ("id", "subject", "teachers", "groups", "rooms", "cancelled", "comment")
@classmethod
def before_save(cls, root, info, input, updated_objects): # noqa: A002
......
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