Skip to content

Commit febcfb2

Browse files
committed
added a method to get units by their CV
1 parent d7f5eab commit febcfb2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/api/ODM2/services/readService.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,12 @@ def getUnitByName(self, unitName):
431431
return self._session.query(Units).filter(Units.UnitsName.ilike(unitName)).first()
432432
except:
433433
return None
434+
435+
def getUnitsByTypeCV(self, unitsTypeCV):
436+
try:
437+
return self._session.query(Units).filter(Units.UnitsTypeCV.ilike(unitsTypeCV)).all()
438+
except:
439+
return None
434440

435441
"""
436442
Organization

0 commit comments

Comments
 (0)