Skip to content
Snippets Groups Projects
Commit 7d1a81c0 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'mi_issue_25_get_discussion_by_promoted' into 'develop'

issue #25 get discussion by promoted returns wrong post

See merge request !55
parents 41f62f61 eb616c9b
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!55issue #25 get discussion by promoted returns wrong post
......@@ -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)
......
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