Skip to content

Commit 9d6cfaf

Browse files
awarde96jameshawkes
authored andcommitted
Pre_path now only takes single values
1 parent 05f9de8 commit 9d6cfaf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

polytope_server/common/datasource/polytope.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ def retrieve(self, request):
6262
# Set the "pre-path" for this request
6363
pre_path = {}
6464
for k, v in r.items():
65+
v = v.split("/") if isinstance(v, str) else v
6566
if k in self.req_single_keys:
6667
if isinstance(v, list):
67-
v = v[0]
68-
pre_path[k] = v
68+
if len(v) == 1:
69+
v = v[0]
70+
pre_path[k] = v
6971

7072
polytope_mars_config = copy.deepcopy(self.config)
7173
polytope_mars_config["options"]["pre_path"] = pre_path

0 commit comments

Comments
 (0)