Skip to content
Snippets Groups Projects
Commit 302d433e authored by Mariusz Trela's avatar Mariusz Trela
Browse files

Fixes in: `bridge_get_by_feed_with_reblog` SQL method,...

Fixes in: `bridge_get_by_feed_with_reblog` SQL method, `_condenser_post_object` method. Submodule update.
parent 66812f66
No related branches found
No related tags found
No related merge requests found
...@@ -72,10 +72,10 @@ BEGIN ...@@ -72,10 +72,10 @@ BEGIN
WHERE hfc.block_num > __cutoff AND hf.state = 1 AND hf.follower = __account_id WHERE hfc.block_num > __cutoff AND hf.state = 1 AND hf.follower = __account_id
GROUP BY hfc.post_id GROUP BY hfc.post_id
HAVING __post_id = 0 OR MIN(hfc.created_at) <= __min_date HAVING __post_id = 0 OR MIN(hfc.created_at) <= __min_date
ORDER BY min_created DESC ORDER BY min_created DESC, hfc.post_id DESC
LIMIT _limit LIMIT _limit
) T ON hp.id = T.post_id ) T ON hp.id = T.post_id
ORDER BY T.min_created DESC; ORDER BY T.min_created DESC, T.post_id DESC;
END END
$BODY$ $BODY$
; ;
...@@ -44,15 +44,15 @@ def _condenser_post_object(row, truncate_body=0, get_content_additions=False): ...@@ -44,15 +44,15 @@ def _condenser_post_object(row, truncate_body=0, get_content_additions=False):
"""Given a hive_posts row, create a legacy-style post object.""" """Given a hive_posts row, create a legacy-style post object."""
paid = row['is_paidout'] paid = row['is_paidout']
# condenser#3424 mitigation
if not row['category']:
row['category'] = 'undefined'
full_payout = row['pending_payout'] + row['payout']; full_payout = row['pending_payout'] + row['payout'];
post = {} post = {}
post['author'] = row['author'] post['author'] = row['author']
post['permlink'] = row['permlink'] post['permlink'] = row['permlink']
post['category'] = row['category']
if not row['category']:
post['category'] = 'undefined' # condenser#3424 mitigation
else:
post['category'] = row['category']
post['title'] = row['title'] post['title'] = row['title']
post['body'] = row['body'][0:truncate_body] if truncate_body else row['body'] post['body'] = row['body'][0:truncate_body] if truncate_body else row['body']
......
Subproject commit 0f0fd1af6d7e367849a87443c0137702b135e297 Subproject commit 1d578e337dec568acbf10464cd996821170ae1c5
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