neurobagel/api

API returns `null` as image modality

Closed this issue · 0 comments

surchs commented

The API now returns null as a value for available image modalities for some datasets. This has the unpleasant consequence that the query tool, being entirely unaccustomed to such content, breaks. We'll fix that part, but the API should probably also stop returning null.

To reproduce:

curl -X 'GET' \
  'http://206.12.89.194:8888/query/' \
  -H 'accept: application/json'

returns

[
  {
    "dataset_uuid": "http://neurobagel.org/vocab/facd318c-5f7f-4ba0-9f0d-928ec1c7f4f7",
    "dataset_name": "PPMI",
    "dataset_portal_uri": null,
    "dataset_total_subjects": 3060,
    "records_protected": true,
    "num_matching_subjects": 3060,
    "subject_data": "protected",
    "image_modals": [
      "http://purl.org/nidash/nidm#T2Weighted",
      "http://purl.org/nidash/nidm#T1Weighted",
      null,
      "http://purl.org/nidash/nidm#DiffusionWeighted"
    ]
  }
]

If I had to guess I'd say this is related to #229.