From f87ea1e5221e34c47da90ab285c6130bda34570c Mon Sep 17 00:00:00 2001 From: Olivier Desenfans Date: Tue, 3 Oct 2023 15:35:59 +0200 Subject: [PATCH] Fix: 400 error on indexer queries Problem: indexer queries fail because of a breaking change. The blockchain parameter is now a literal string instead of an enum value, requiring additional quotes. Solution: add quotes around the blockchain parameter value. --- src/aleph/chains/indexer_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aleph/chains/indexer_reader.py b/src/aleph/chains/indexer_reader.py index 0a2a76f92..0fbfd81a7 100644 --- a/src/aleph/chains/indexer_reader.py +++ b/src/aleph/chains/indexer_reader.py @@ -51,7 +51,7 @@ def make_account_state_query( return """ { state: accountState( - blockchain: %s + blockchain: "%s" account: %s type: %s ) { @@ -95,7 +95,7 @@ def make_events_query( fields = "\n".join(model.__fields__.keys()) params: Dict[str, Any] = { - "blockchain": blockchain.value, + "blockchain": f'"{blockchain.value}"', "limit": limit, "reverse": "false", }