Skip to content
Snippets Groups Projects
Commit 7157b8d9 authored by Arcange's avatar Arcange
Browse files

Bug fix - active_votes was missing for deleted posts

parent 7ebdd541
No related branches found
No related tags found
1 merge request!276Fix get_content returns cache error when post is deleted #73
......@@ -246,7 +246,9 @@ async def get_content(context, author: str, permlink: str, observer=None):
result = dict(result[0])
deleted = result['counter_deleted']
post = _condenser_post_object(result, 0, True, deleted)
if not deleted:
if deleted:
post['active_votes'] = []
else:
post['active_votes'] = await find_votes_impl(db, author, permlink, VotesPresentation.ActiveVotes)
if not observer:
post['active_votes'] = _mute_votes(post['active_votes'], Mutes.all())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment