Skip to content

Commit

Permalink
fix reblog date
Browse files Browse the repository at this point in the history
  • Loading branch information
roadscape committed Feb 12, 2020
1 parent 89ac82d commit ead36df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions hive/indexer/posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def delete(cls, op):
if not DbState.is_initial_sync():
CachedPost.delete(pid, op['author'], op['permlink'])
if depth == 0:
# TODO: delete from hive_reblogs -- otherwise feed cache gets populated with deleted posts somwrimas
FeedCache.delete(pid)
else:
# force parent child recount when child is deleted
Expand Down
4 changes: 2 additions & 2 deletions hive/server/condenser_api/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ async def _get_blog(db, account: str, start_index: int, limit: int = None):
idx = int(start_index)
for post in await load_posts(db, ids):
reblog = post['author'] != account
reblog_on = post['created'] if reblog else "1970-01-01T00"
reblog_on = post['created'] if reblog else "1970-01-01T00:00:00"
out.append({"blog": account,
"entry_id": idx,
"comment": post,
"reblog_on": reblog_on})
"reblogged_on": reblog_on})
idx -= 1

return out
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
setup_requires=['pytest-runner'],
tests_require=tests_require,
install_requires=[
#'aiopg==0.16.0',
'aiopg @ https://github.com/aio-libs/aiopg/tarball/862fff97e4ae465333451a4af2a838bfaa3dd0bc',
'jsonrpcserver==4.0.1',
'aiohttp',
Expand Down

0 comments on commit ead36df

Please sign in to comment.