Fix #5376 - Ensure links have correct ID

This ensures that links to comments have the correct ID (the
ID of the Comment object) as well as fixing deletion on reports
and fixing a few other little things. I hope this fixes the #5376
issue, though cannot reproduce so unable to confirm.
This commit is contained in:
Jessica Tallon
2016-03-01 11:58:38 +00:00
parent 1db8690fe9
commit 161bc6b2c1
7 changed files with 25 additions and 24 deletions

View File

@@ -75,6 +75,11 @@ def mark_comment_notification_seen(comment_id, user):
obj_pk=comment.id,
model_type=comment.__tablename__
).first()
# If there is no GMR, there is no notification
if comment_gmr == None:
return
notification = Notification.query.filter_by(
user_id=user.id,
object_id=comment_gmr.id