From 69339700cd59933329abbcd26bf5c9b4b8cab81a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 29 Mar 2021 19:26:33 +0200 Subject: [PATCH] Fix event creation Signed-off-by: Thomas Citharel --- js/src/views/Event/Edit.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue index f67ba5dc2..3d098bfb3 100644 --- a/js/src/views/Event/Edit.vue +++ b/js/src/views/Event/Edit.vue @@ -859,9 +859,12 @@ export default class EditEvent extends Vue { */ private async buildVariables() { let res = this.event.toEditJSON(); - if (this.event.organizerActor) { + const organizerActor = this.event.organizerActor?.id + ? this.event.organizerActor + : this.organizerActor; + if (organizerActor) { res = Object.assign(res, { - organizerActorId: this.event.organizerActor.id, + organizerActorId: organizerActor.id, }); } const attributedToId = this.event.attributedTo?.id