From 9744db2339f7b85744ad4a53055f53c153a80b59 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 12 Jan 2020 12:50:52 +0000 Subject: [PATCH] Only create scheduled posts if there is a date and time given --- posts.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index b7d11fd08..8887b6461 100644 --- a/posts.py +++ b/posts.py @@ -718,7 +718,11 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \ if saveToFile: outboxName='outbox' if schedulePost: - outboxName='scheduled' + if eventDate and eventTime: + outboxName='scheduled' + else: + print('Unable to create scheduled post without date and time values') + return newPost savePostToBox(baseDir,httpPrefix,newPostId, \ nickname,domain,newPost,outboxName) return newPost