Skip to content

Commit

Permalink
fix: normilize hexstr before querying in fdc views
Browse files Browse the repository at this point in the history
  • Loading branch information
janezicmatej committed Nov 13, 2024
1 parent 6b3102e commit 372b522
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fdc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from rest_framework import decorators, response, serializers, status, viewsets

from fdc.models import AttestationResult
from processing.utils import un_prefix_0x

from .serializers.data import AttestationMinimalProofSerializer
from .serializers.query import ListAttestationResultQuerySerializer
Expand Down Expand Up @@ -58,7 +59,7 @@ def get_proof_round_id_bytes(self, request, *args, **kwargs):
try:
obj = self.get_queryset().get(
voting_round_id=body["votingRoundId"],
request_hex=body["requestBytes"],
request_hex=un_prefix_0x(body["requestBytes"]),
)
except AttestationResult.DoesNotExist:
return response.Response(
Expand Down

0 comments on commit 372b522

Please sign in to comment.