Skip to content

Commit

Permalink
add mailing address to employee data model (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Vargas-bcgov authored Feb 21, 2024
1 parent 40160b2 commit 342908d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions forms-flow-api/src/formsflow_api/models/employee_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ def __init__(self, data, noofrecords=1):
self.empId = data.get("EMPLID")
self.positionTitle = data.get("position_title")
self.depId = data.get("DEPTID")
self.mailAddress = ", ".join(filter(None, [
value.strip() for key, value in [
("mail_address1", data.get("mail_address1")),
("mail_address2", data.get("mail_address2")),
("mail_city", data.get("mail_city")),
("mail_stateprovince", data.get("mail_stateprovince")),
("mail_postal", data.get("mail_postal"))
] if value is not None and isinstance(value, str)]))
self.mailAddress1 = data.get("mail_address1")
self.mailAddress2 = data.get("mail_address2")
self.mailCity = data.get("mail_city")
self.mailCountry = data.get("mail_country")
self.mailPostal = data.get("mail_postal")
self.mailStateprovince = data.get("mail_stateprovince")
self.officeAddress = ", ".join(filter(None, [
value.strip() for key, value in [
("office_address1", data.get("office_address1")),
Expand Down

0 comments on commit 342908d

Please sign in to comment.