summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kirillov <w96k@runbox.com>2024-10-11 02:03:28 +0400
committerMikhail Kirillov <w96k@runbox.com>2024-10-11 02:03:28 +0400
commitac7b16a5ac02b9a8b4b8c42bcb97f0e27c61ac0c (patch)
tree58e3fa6d95622f6e656d3d6bada47c1770763853
parent69dd60cc024063daf1591168a64a32e771bd7f1b (diff)
fixup! Task #30. Allow anyone create or edit upcoming eventHEADmaster
-rw-r--r--commands/event.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/commands/event.py b/commands/event.py
index 034ce36..b4839ed 100644
--- a/commands/event.py
+++ b/commands/event.py
@@ -73,7 +73,10 @@ async def create_event(
user=last_movie["user"]
)
- events[-1] = event_dict
+ if len(events) > 0:
+ events[-1] = event_dict
+ else:
+ events.append(event_dict)
await update.message.reply_text(
EVENT_EDITED.format(