From 3e6a061b6f8926b12e13e8f82c61269f820cd6f9 Mon Sep 17 00:00:00 2001 From: bbonf Date: Tue, 2 Jan 2024 10:55:48 +0100 Subject: [PATCH] fixed display for participant fields --- lab/participants/models/participant.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lab/participants/models/participant.py b/lab/participants/models/participant.py index 9e4b15a3..64e79c71 100644 --- a/lab/participants/models/participant.py +++ b/lab/participants/models/participant.py @@ -94,7 +94,13 @@ def fullname(self): return self.name def get_sex_display(self): - return self.Sex(self.sex).label + return self.data.get_sex_display() + + def get_birth_weight_display(self): + return self.data.get_birth_weight_display() + + def get_pregnancy_duration_display(self): + return self.data.get_pregnancy_duration_display() @property def dyslexic_parent_bool(self) -> bool | None: