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

Add id field in amend lesson patch mutation

parent c1942fc0
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"
......@@ -166,7 +166,7 @@ export default {
};
},
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