def _adjust_defaults(self):
''' Adjust the default parameters to include necessary parameters
For any query involving DAP DB, always return the spaxel index
TODO: change this to spaxel x and y
TODO: change this entirely
'''
dapschema = ['dapdb' in c.class_.__table__.schema for c in self.queryparams]
if any(dapschema):
dapcols = ['spaxelprop.x', 'spaxelprop.y', 'bintype.name', 'template.name']
self.defaultparams.extend(dapcols)
self.params.extend(dapcols)
self.params = list(OrderedDict.fromkeys(self.params))
self._create_query_modelclasses()
# qpdap = self.marvinform._param_form_lookup.mapToColumn(dapcols)
# self.queryparams.extend(qpdap)
# self.queryparams_order.extend([q.key for q in qpdap])
评论列表
文章目录