Skip to content

Commit fae1c64

Browse files
author
sreeder
committed
merge changes to the base function
1 parent 9c28915 commit fae1c64

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

odm2api/ODM2/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,7 @@ class SpectraResultValues(Base):
17731773
)
17741774

17751775

1776+
17761777
class TimeSeriesResultValues(Base):
17771778

17781779
ValueID = Column('valueid', BigIntegerType, primary_key=True)

odm2api/ODM2/services/readService.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,13 @@ def getUnits(self, ids=None, name=None, type=None):
527527
try:
528528
return q.all()
529529
except Exception as e:
530+
<<<<<<< Updated upstream
530531
print('Error running Query: {}'.format(e))
531532
return None
533+
=======
534+
print("Error running Query: %s" % e)
535+
return []
536+
>>>>>>> Stashed changes
532537

533538
# Organization
534539
def getOrganizations(self, ids=None, codes=None):

odm2api/base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ def __repr__(self):
4141
for v in valuedict.keys():
4242
if 'obj' in v.lower():
4343
del valuedict[v]
44-
# del valuedict["_sa_instance_state"]
45-
return '<%s(%s)>' % (self.__class__.__name__, str(valuedict))
44+
45+
if v == "_sa_instance_state":
46+
del valuedict["_sa_instance_state"]
47+
return "<%s(%s)>" % (self.__class__.__name__, str(valuedict))
48+
4649

4750

4851
class modelBase():

0 commit comments

Comments
 (0)