diff --git a/hive/server/condenser_api/cursor.py b/hive/server/condenser_api/cursor.py index fa200c11310a3911677a30088d6d416e0fe166c1..47399c423c7ed4a070c60a7f519c54c3f055b9e0 100644 --- a/hive/server/condenser_api/cursor.py +++ b/hive/server/condenser_api/cursor.py @@ -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 DESC LIMIT :limit """ % (' AND '.join(where), field) return await db.query_col(sql, tag=tag, start_id=start_id, limit=limit)