From e94fc29706cd8e8fd892182d4de0a3ae80a3820f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 18 Jun 2018 10:24:53 +0200 Subject: Fix removing scheduled update --- client/src/app/shared/video/video-edit.model.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/video/video-edit.model.ts') diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 78aed4f9f..8562f8d25 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts @@ -55,7 +55,7 @@ export class VideoEdit implements VideoUpdate { }) // If schedule publication, the video is private and will be changed to public privacy - if (values['schedulePublicationAt']) { + if (parseInt(values['privacy'], 10) === VideoEdit.SPECIAL_SCHEDULED_PRIVACY) { const updateAt = (values['schedulePublicationAt'] as Date) updateAt.setSeconds(0) @@ -64,6 +64,8 @@ export class VideoEdit implements VideoUpdate { updateAt: updateAt.toISOString(), privacy: VideoPrivacy.PUBLIC } + } else { + this.scheduleUpdate = null } } -- cgit v1.2.3