Update notified at published time if empty
This commit is contained in:
parent
ee09cfaf40
commit
633be8096b
@ -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()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user