Skip to content

Commit

Permalink
chore: use alias for jsonpath parse
Browse files Browse the repository at this point in the history
Signed-off-by: Char Howland <char@indicio.tech>
  • Loading branch information
cjhowland committed Sep 19, 2023
1 parent 636ed44 commit 5d0335f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aries_cloudagent/wallet/sd_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
from typing import Any, List, Mapping, Optional, Union
from marshmallow import fields
from jsonpath_ng.ext import parse
from jsonpath_ng.ext import parse as jsonpath_parse
from sd_jwt.common import SDObj
from sd_jwt.issuer import SDJWTIssuer
from sd_jwt.verifier import SDJWTVerifier
Expand Down Expand Up @@ -152,7 +152,7 @@ async def sd_jwt_sign(
"""
sd_list = create_sd_list(payload, non_sd_list)
for sd in sd_list:
jsonpath_expression = parse(f"$.{sd}")
jsonpath_expression = jsonpath_parse(f"$.{sd}")
matches = jsonpath_expression.find(payload)
if len(matches) < 1:
raise SDJWTError(f"Claim for {sd} not found in payload.")
Expand Down

0 comments on commit 5d0335f

Please sign in to comment.