Skip to content

Commit

Permalink
REF: Always use the shorten URI when creating a project experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuguetn committed Oct 16, 2020
1 parent 848e95c commit 4d1c682
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions pyxnat/core/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,15 +1210,9 @@ def experiment(self, ID):
dp = datapath % (self._intf._get_entry_point(), self.id(), ID)

tmp = Experiment(dp, self._intf)
if tmp.id() == ID:
return tmp
else:
# if id id not mach given id (which may have been a label
# re-select with the ID of the matching experiment.
return Experiment(datapath % (
self._intf._get_entry_point(), self.id(), tmp.id()),
self._intf
)
e_uri = '%s/experiments/%s' % (self._intf._get_entry_point(),
tmp.id())
return Experiment(e_uri, self._intf)

def last_modified(self):
""" Gets the last modified dates for all the project subjects.
Expand Down

0 comments on commit 4d1c682

Please sign in to comment.