dev@locazia: fix indexer

This commit is contained in:
user committed 2024-03-10 14:29:46 +03:00
1 parent dae4a6f123
commit c4be5a8099
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ async def indexer_loop(memory, platform_found: bool, seqno: int) -> [bool, int]:
session.commit()
last_known_index = session.query(StoredContent).filter(
StoredContent.type == "onchain/content"
StoredContent.onchain_index != None
).order_by(StoredContent.onchain_index.desc()).first()
last_known_index = last_known_index.onchain_index if last_known_index else 0
last_known_index = max(last_known_index, 0)