@@ -1297,31 +1297,31 @@ def getResultValues(self, resultids, starttime=None, endtime=None):
12971297
12981298 """
12991299 restype = self ._session .query (Results ).filter_by (ResultID = resultids [0 ]).first ().ResultTypeCV
1300- ResultType = TimeSeriesResultValues
1300+ ResultValues = TimeSeriesResultValues
13011301 if 'categorical' in restype .lower ():
1302- ResultType = CategoricalResultValues
1302+ ResultValues = CategoricalResultValues
13031303 elif 'measurement' in restype .lower ():
1304- ResultType = MeasurementResultValues
1304+ ResultValues = MeasurementResultValues
13051305 elif 'point' in restype .lower ():
1306- ResultType = PointCoverageResultValues
1306+ ResultValues = PointCoverageResultValues
13071307 elif 'profile' in restype .lower ():
1308- ResultType = ProfileResultValues
1308+ ResultValues = ProfileResultValues
13091309 elif 'section' in restype .lower ():
1310- ResultType = SectionResults
1310+ ResultValues = SectionResults
13111311 elif 'spectra' in restype .lower ():
1312- ResultType = SpectraResultValues
1312+ ResultValues = SpectraResultValues
13131313 elif 'time' in restype .lower ():
1314- ResultType = TimeSeriesResultValues
1314+ ResultValues = TimeSeriesResultValues
13151315 elif 'trajectory' in restype .lower ():
1316- ResultType = TrajectoryResultValues
1316+ ResultValues = TrajectoryResultValues
13171317 elif 'transect' in restype .lower ():
1318- ResultType = TransectResultValues
1318+ ResultValues = TransectResultValues
13191319
1320- q = self ._session .query (ResultType ).filter (ResultType .ResultID .in_ (resultids ))
1320+ q = self ._session .query (ResultValues ).filter (ResultValues .ResultID .in_ (resultids ))
13211321 if starttime :
1322- q = q .filter (ResultType .ValueDateTime >= starttime )
1322+ q = q .filter (ResultValues .ValueDateTime >= starttime )
13231323 if endtime :
1324- q = q .filter (ResultType .ValueDateTime <= endtime )
1324+ q = q .filter (ResultValues .ValueDateTime <= endtime )
13251325 try :
13261326 # F841 local variable 'vals' is assigned to but never used
13271327 # vals = q.order_by(ResultType.ValueDateTime)
@@ -1331,7 +1331,7 @@ def getResultValues(self, resultids, starttime=None, endtime=None):
13311331 con = self ._session_factory .engine ,
13321332 params = query .params
13331333 )
1334- df .columns = [self ._get_columns (ResultType )[c ] for c in df .columns ]
1334+ df .columns = [self ._get_columns (ResultValues )[c ] for c in df .columns ]
13351335 return df
13361336 except Exception as e :
13371337 print ('Error running Query: {}' .format (e ))
0 commit comments