Skip to content

Commit

Permalink
Merge pull request #4674 from bcgov/dev-NK-4650
Browse files Browse the repository at this point in the history
fix issue if birthdate field does not exist
  • Loading branch information
nkan-aot authored Oct 31, 2023
2 parents 393b1b2 + 341f62f commit 813cf7a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __prepareadditionalpersonalinfo(self, requestrawdata):
return {
'alsoKnownAs': contactinfo['alsoKnownAs'],
'requestFor': requestrawdata['selectAbout'],
'birthDate': parse(contactinfo['birthDate']).strftime(self.__generaldateformat()) if contactinfo['birthDate'] is not None else '',
'birthDate': parse(contactinfo['birthDate']).strftime(self.__generaldateformat()) if contactinfo.get('birthDate', None) is not None else '',

'childFirstName': self.__getpropertyvalue(childinformation,'firstName', haschildinfo),
'childMiddleName': self.__getpropertyvalue(childinformation,'middleName', haschildinfo),
Expand Down Expand Up @@ -227,4 +227,4 @@ def __ispersonalinfopresent(self, criteria):
return True if criteria != None else False

def __generaldateformat(self):
return '%Y-%m-%d'
return '%Y-%m-%d'

0 comments on commit 813cf7a

Please sign in to comment.