@@ -49,16 +49,16 @@ def retrieve(self, request, name):
4949 dataset_schema = dataset .schema
5050
5151 # Table filtering
52- tables_param = request .query_params .getlist ("tables" )
52+ tables_param = request .query_params .get ("tables" )
5353 if tables_param :
54- dataset_schema = DatasetSchema .filter_on_tables (dataset_schema , tables_param )
54+ tables = tables_param .split ("," )
55+ dataset_schema = DatasetSchema .filter_on_tables (dataset_schema , tables )
5556
5657 # Scope filtering
57- scopes_param = request .query_params .getlist ("scopes" )
58+ scopes_param = request .query_params .get ("scopes" )
5859 if scopes_param :
59-
6060 # Transform url safe scope ids to regular ids
61- scopes = [scope .replace ("_" , "/" ).upper () for scope in scopes_param ]
61+ scopes = [scope .replace ("_" , "/" ).upper () for scope in scopes_param . split ( "," ) ]
6262 dataset_schema = DatasetSchema .filter_on_scopes (dataset_schema , scopes )
6363
6464 return Response (dataset_schema )
@@ -71,16 +71,17 @@ def version(self, request, name, vmajor):
7171 dataset_schema = dataset .schema
7272
7373 # Table filtering
74- tables_param = request .query_params .getlist ("tables" )
74+ tables_param = request .query_params .get ("tables" )
7575 if tables_param :
76- dataset_schema = DatasetSchema .filter_on_tables (dataset_schema , tables_param )
76+ tables = tables_param .split ("," )
77+ dataset_schema = DatasetSchema .filter_on_tables (dataset_schema , tables )
7778
7879 # Scope filtering
79- scopes_param = request .query_params .getlist ("scopes" )
80+ scopes_param = request .query_params .get ("scopes" )
8081 if scopes_param :
8182
8283 # Transform url safe scope ids to regular ids
83- scopes = [scope .replace ("_" , "/" ).upper () for scope in scopes_param ]
84+ scopes = [scope .replace ("_" , "/" ).upper () for scope in scopes_param . split ( "," ) ]
8485 dataset_schema = DatasetSchema .filter_on_scopes (dataset_schema , scopes )
8586
8687 try :
@@ -98,11 +99,11 @@ def table(self, request, name, vmajor, table_id):
9899 dataset_schema = dataset .schema
99100
100101 # Scope filtering
101- scopes_param = request .query_params .getlist ("scopes" )
102+ scopes_param = request .query_params .get ("scopes" )
102103 if scopes_param :
103104
104105 # Transform url safe scope ids to regular ids
105- scopes = [scope .replace ("_" , "/" ).upper () for scope in scopes_param ]
106+ scopes = [scope .replace ("_" , "/" ).upper () for scope in scopes_param . split ( "," ) ]
106107 dataset_schema = DatasetSchema .filter_on_scopes (dataset_schema , scopes )
107108
108109 try :
0 commit comments