diff --git a/src/stacosys/db/dao.py b/src/stacosys/db/dao.py index 307e439..5f21ae3 100644 --- a/src/stacosys/db/dao.py +++ b/src/stacosys/db/dao.py @@ -18,6 +18,9 @@ def notify_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().commit()