Skip to content

Commit

Permalink
Fix empty status string handling, address #6175.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Jun 28, 2024
1 parent bab7d84 commit 21a4b32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion beacon_chain/rpc/rest_beacon_api.nim
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,11 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
Http400, InvalidRequestBodyError, $error)
let
ids = request.ids.valueOr: @[]
filter = request.status.valueOr: AllValidatorFilterKinds
filter =
if request.status.isNone() or len(request.status.get) == 0:
AllValidatorFilterKinds
else:
request.status.get
(ids, filter)
sid = state_id.valueOr:
return RestApiResponse.jsonError(Http400, InvalidStateIdValueError,
Expand Down

0 comments on commit 21a4b32

Please sign in to comment.