forked from rDrama/rDrama
fdsfds
parent
20c3bf0185
commit
ab3ec6a158
|
@ -210,14 +210,6 @@ def award_post(pid, v):
|
||||||
if not post:
|
if not post:
|
||||||
return {"error": "That post doesn't exist."}, 404
|
return {"error": "That post doesn't exist."}, 404
|
||||||
|
|
||||||
existing_award = g.db.query(AwardRelationship).filter(
|
|
||||||
and_(
|
|
||||||
AwardRelationship.submission_id == post.id,
|
|
||||||
AwardRelationship.user_id == v.id,
|
|
||||||
AwardRelationship.kind == kind
|
|
||||||
)
|
|
||||||
).first()
|
|
||||||
|
|
||||||
post_award.submission_id = post.id
|
post_award.submission_id = post.id
|
||||||
g.db.add(post_award)
|
g.db.add(post_award)
|
||||||
|
|
||||||
|
@ -384,14 +376,6 @@ def award_comment(cid, v):
|
||||||
if not c:
|
if not c:
|
||||||
return {"error": "That comment doesn't exist."}, 404
|
return {"error": "That comment doesn't exist."}, 404
|
||||||
|
|
||||||
existing_award = g.db.query(AwardRelationship).filter(
|
|
||||||
and_(
|
|
||||||
AwardRelationship.comment_id == c.id,
|
|
||||||
AwardRelationship.user_id == v.id,
|
|
||||||
AwardRelationship.kind == kind
|
|
||||||
)
|
|
||||||
).first()
|
|
||||||
|
|
||||||
comment_award.comment_id = c.id
|
comment_award.comment_id = c.id
|
||||||
g.db.add(comment_award)
|
g.db.add(comment_award)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue