Skip to content

Commit ea2333b

Browse files
committed
Modified xnat_access.py to account for the fact that ConnectomeDB uses project 'id' and IntraDB uses project 'ID'
1 parent b738a03 commit ea2333b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

xnat_access.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ def get_jsession_id(self):
137137
def get_project_id_list(self):
138138
"""Get the list of valid project ids for the XNAT server."""
139139
request_url = self._server + 'data/projects'
140-
project_id_list = self._get_json_response_list(request_url, 'id')
140+
141+
try:
142+
project_id_list = self._get_json_response_list(request_url, 'id')
143+
except KeyError:
144+
project_id_list = self._get_json_response_list(request_url, 'ID')
145+
141146
return project_id_list
142147

143148
def get_project(self):

0 commit comments

Comments
 (0)