remotes/1693045480750635534/spooky-22
Aevann1 2021-09-18 19:44:21 +02:00
parent f724a74687
commit 5fc33e2039
1 changed files with 5 additions and 4 deletions

View File

@ -896,11 +896,12 @@ def save_comment(cid, v):
comment=get_comment(cid)
new_save=SaveRelationship(user_id=v.id, submission_id=comment.id, type=2)
save=g.db.query(SaveRelationship).options(lazyload('*')).filter_by(user_id=v.id, submission_id=comment.id, type=2).first()
g.db.add(new_save)
g.db.commit()
if not save:
new_save=SaveRelationship(user_id=v.id, submission_id=comment.id, type=2)
g.db.add(new_save)
g.db.commit()
return {"message": "Comment saved!"}