fsfs
This commit is contained in:
parent
dbf462c4e2
commit
7d60a597e5
1 changed files with 5 additions and 4 deletions
|
@ -896,11 +896,12 @@ def save_comment(cid, v):
|
||||||
|
|
||||||
comment=get_comment(cid)
|
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)
|
if not save:
|
||||||
|
new_save=SaveRelationship(user_id=v.id, submission_id=comment.id, type=2)
|
||||||
g.db.commit()
|
g.db.add(new_save)
|
||||||
|
g.db.commit()
|
||||||
|
|
||||||
return {"message": "Comment saved!"}
|
return {"message": "Comment saved!"}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue