From ead36df8f3d839340373e0a2a597ca982eb5d438 Mon Sep 17 00:00:00 2001 From: roadscape Date: Wed, 12 Feb 2020 11:44:53 -0600 Subject: [PATCH] fix reblog date --- hive/indexer/posts.py | 1 + hive/server/condenser_api/methods.py | 4 ++-- setup.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hive/indexer/posts.py b/hive/indexer/posts.py index 3d2fbb08a..9a72cd243 100644 --- a/hive/indexer/posts.py +++ b/hive/indexer/posts.py @@ -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 diff --git a/hive/server/condenser_api/methods.py b/hive/server/condenser_api/methods.py index 133c28ff7..97f2d1ca3 100644 --- a/hive/server/condenser_api/methods.py +++ b/hive/server/condenser_api/methods.py @@ -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 diff --git a/setup.py b/setup.py index aafab0cbf..f2b17ae7c 100644 --- a/setup.py +++ b/setup.py @@ -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',