Skip to content

Commit

Permalink
Pass validator str to match existing interface
Browse files Browse the repository at this point in the history
  • Loading branch information
wtclarke committed Oct 21, 2024
1 parent b0a26ed commit 0755390
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nifti_mrs/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def validate_nifti_mrs(nifti_mrs):

# Validate header extension
validate_hdr_ext(
nifti_mrs.header.extensions[0],
nifti_mrs.header.extensions[0].text,
nifti_mrs.shape)

# Validate that any SpectralWidth definition matches pixdim[4]
Expand Down Expand Up @@ -97,7 +97,7 @@ def validate_hdr_ext(header_ex, dimension_sizes, data_dimensions=None):
"""
# 1. Check that header_ext is json
try:
json_dict = header_ex.json()
json_dict = json.loads(header_ex)
except json.JSONDecodeError as exc:
raise headerExtensionError("Header extension is not json deserialisable.") from exc

Expand Down

0 comments on commit 0755390

Please sign in to comment.