Update notified at published time if empty
This commit is contained in:
parent
ee09cfaf40
commit
633be8096b
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue