Skip to content

Commit a671b4f

Browse files
committed
modifying create and read service methods.
1 parent 081e79d commit a671b4f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/api/ODM2/services/createService.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def createSamplingFeature(self, uuid, code, vType, name=None, description=None,
151151
return sf
152152

153153

154-
def createUnit(self, type, abbrev, name):
154+
def createUnit(self, type, abbrev, name, link=None):
155155
"""Create Unit table
156156
157157
:param code:
@@ -166,6 +166,7 @@ def createUnit(self, type, abbrev, name):
166166
unit.UnitsTypeCV = type
167167
unit.UnitsAbbreviation = abbrev
168168
unit.UnitsName = name
169+
unit.UnitsLink = link
169170

170171
self._session.add(unit)
171172
self._session.commit()

src/api/ODM2/services/readService.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def __init__(self, result,
2828
self.processingLevelDef = processingLevel.Definition
2929

3030
class DetailedAffiliation:
31-
def __init__(self, person, org):
31+
def __init__(self, affiliation, person, org):
32+
self.affiliationID = affiliation.AffiliationID
3233
self.name = person.PersonFirstName + \
3334
" " + \
3435
person.PersonLastName
@@ -167,7 +168,7 @@ def getDetailedAffiliationInfo(self):
167168
.filter(Affiliations.OrganizationID==Organizations.OrganizationID)
168169
affiliationList = []
169170
for a,p,o in q.all():
170-
detailedAffiliation = DetailedAffiliation(p,o)
171+
detailedAffiliation = DetailedAffiliation(a,p,o)
171172
affiliationList.append(detailedAffiliation)
172173
return affiliationList
173174

0 commit comments

Comments
 (0)