Fixed zero trust bug where all events had the same timestamp

This commit is contained in:
VakarisZ 2020-05-06 16:50:17 +03:00
parent 8a385eca93
commit 4073e2f41f
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ class Event(EmbeddedDocument):
# LOGIC
@staticmethod
def create_event(title, message, event_type, timestamp=datetime.now()):
def create_event(title, message, event_type, timestamp=None):
if not timestamp:
timestamp = datetime.now()
event = Event(
timestamp=timestamp,
title=title,