Skip to content
Snippets Groups Projects
Commit 60764a87 authored by Marcin's avatar Marcin
Browse files

issue #25: wrong post in get_discussions_by_promoted test

parent cfb463b1
No related branches found
No related tags found
No related merge requests found
......@@ -149,7 +149,7 @@ async def pids_by_query(db, sort, start_author, start_permlink, limit, tag):
'trending': ('sc_trend', True, False, False, False), # posts=True pending=False
'hot': ('sc_hot', True, False, False, False), # posts=True pending=False
'created': ('id', False, True, False, False),
'promoted': ('promoted', True, False, False, True), # posts=True
'promoted': ('promoted', False, False, False, True), # posts=True
'payout': ('payout', True, True, False, False),
'payout_comments': ('payout', True, False, True, False),
}[sort]
......@@ -236,7 +236,7 @@ async def pids_by_query(db, sort, start_author, start_permlink, limit, tag):
INNER JOIN hive_permlink_data hpd_pp ON hpd_pp.id = hp.parent_permlink_id
INNER JOIN hive_accounts ha_ra ON ha_ra.id = hp.root_author_id
INNER JOIN hive_permlink_data hpd_rp ON hpd_rp.id = hp.root_permlink_id
WHERE %s ORDER BY %s DESC LIMIT :limit
WHERE %s ORDER BY %s DESC, hp.id LIMIT :limit
""" % (' AND '.join(where), field)
return await db.query_col(sql, tag=tag, start_id=start_id, limit=limit)
......
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