Skip to content

Commit

Permalink
Cast spatial resolution as an actual Decimal, not a float
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jun 18, 2024
1 parent 8ff3c5c commit 715daa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/dcat/profiles/euro_dcat_ap_2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
from decimal import Decimal

from rdflib import URIRef, BNode, Literal
from ckanext.dcat.utils import resource_uri
Expand Down Expand Up @@ -222,7 +223,7 @@ def graph_from_dataset(self, dataset_dict, dataset_ref):
(
dataset_ref,
DCAT.spatialResolutionInMeters,
Literal(float(value), datatype=XSD.decimal),
Literal(Decimal(value), datatype=XSD.decimal),
)
)
except (ValueError, TypeError):
Expand Down

0 comments on commit 715daa7

Please sign in to comment.