From 39404633e6ed10e77bd953c98206d1c7465ed23a Mon Sep 17 00:00:00 2001 From: Gui Iribarren Date: Mon, 9 Sep 2024 13:04:12 +0200 Subject: [PATCH] api: hotfix /elections 'organization not found' error due to how the indexer is organized, if an organization hasn't created yet any election, EntityExists returns false although the account does exist. --- api/elections.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/elections.go b/api/elections.go index 9e921f616..5548a48b6 100644 --- a/api/elections.go +++ b/api/elections.go @@ -292,7 +292,7 @@ func (a *API) electionListHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContex // // Errors returned are always of type APIerror. func (a *API) electionList(params *ElectionParams) (*ElectionsList, error) { - if params.OrganizationID != "" && !a.indexer.EntityExists(params.OrganizationID) { + if params.OrganizationID != "" && !a.indexer.AccountExists(params.OrganizationID) { return nil, ErrOrgNotFound }