Update notified at published time if empty

This commit is contained in:
Yax 2025-08-17 16:31:57 +02:00
parent ee09cfaf40
commit 633be8096b

View file

@ -18,6 +18,9 @@ def notify_comment(comment: Comment):
def publish_comment(comment: Comment): def publish_comment(comment: Comment):
# if published before notification is received
if comment.notified == None:
db()(db().comment.id == comment.id).update(notified=datetime.now())
db()(db().comment.id == comment.id).update(published=datetime.now()) db()(db().comment.id == comment.id).update(published=datetime.now())
db().commit() db().commit()