Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Prevent Traceback in patients listing when dob is not set #182

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions bika/health/browser/patients/folder_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,8 @@ def folderitems(self, full_objects=False, classic=False):
def folderitem(self, obj, item, index):
# Date of Birth
dob = obj.getBirthDate
item['getBirthDate'] = self.ulocalized_time(dob)

# Patient's current age
item["age"] = get_age_ymd(dob)
item['getBirthDate'] = dob and self.ulocalized_time(dob) or ""
item["age"] = dob and get_age_ymd(dob) or ""

# make the columns patient title, patient ID and client patient ID
# redirect to the Analysis Requests of the patient
Expand Down