@@ -127,7 +127,7 @@ def _activate_form(self, response, form_index=0, inputs={}, cache=True,
127127
128128 if key in inputs :
129129 value = str (inputs [key ])
130- if (key is not None ) and (value is not None ):
130+ if (key is not None ): # and (value is not None):
131131 if fmt == 'multipart/form-data' :
132132 if is_file :
133133 payload .append (
@@ -136,6 +136,8 @@ def _activate_form(self, response, form_index=0, inputs={}, cache=True,
136136 if type (value ) is list :
137137 for v in value :
138138 payload .append ((key , ('' , v )))
139+ elif value is None :
140+ payload .append ((key , ('' , '' )))
139141 else :
140142 payload .append ((key , ('' , value )))
141143 else :
@@ -152,6 +154,8 @@ def _activate_form(self, response, form_index=0, inputs={}, cache=True,
152154 if method is not None :
153155 fmt = method
154156
157+ log .debug ("Method/format = {0}" .format (fmt ))
158+
155159 # Send payload
156160 if fmt == 'get' :
157161 response = self ._request ("GET" , url , params = payload , cache = cache )
@@ -244,7 +248,7 @@ def list_instruments(self, cache=True):
244248 self ._instrument_list .append (u'harps' )
245249 return self ._instrument_list
246250
247- def query_surveys (self , surveys = 'any_collection_id ' , cache = True ,
251+ def query_surveys (self , surveys = '' , cache = True ,
248252 help = False , open_form = False , ** kwargs ):
249253 """
250254 Query survey Phase 3 data contained in the ESO archive.
@@ -283,17 +287,6 @@ def query_surveys(self, surveys='any_collection_id', cache=True,
283287 else :
284288 query_dict ["max_rows_returned" ] = 10000
285289
286- # missing entries:
287- # filter: Any
288- # tel_id: Any
289- # ins_id: Any
290- # obstech: Any
291- # date_obs:
292- # mjd_obs:
293- # exptime:
294- #
295- # collection_name should be blank (?)
296-
297290 survey_response = self ._activate_form (survey_form , form_index = 0 ,
298291 inputs = query_dict , cache = cache )
299292
0 commit comments