Skip to content

Commit 3940463

Browse files
committed
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.
1 parent c3cf08a commit 3940463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/elections.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ func (a *API) electionListHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContex
292292
//
293293
// Errors returned are always of type APIerror.
294294
func (a *API) electionList(params *ElectionParams) (*ElectionsList, error) {
295-
if params.OrganizationID != "" && !a.indexer.EntityExists(params.OrganizationID) {
295+
if params.OrganizationID != "" && !a.indexer.AccountExists(params.OrganizationID) {
296296
return nil, ErrOrgNotFound
297297
}
298298

0 commit comments

Comments
 (0)