changeset 1501:635948823670

fix bug #42938: health_socioeconomics : Error on Family APGAR selections. int() argument must be a string or a number, not 'NoneType'
author Bruno M. Villasanti <bvillasanti@thymbra.com>
date Thu, 07 Aug 2014 19:26:09 -0300
parents 7aac8901d471
children 47e509668254
files tryton/health_socioeconomics/health_socioeconomics.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tryton/health_socioeconomics/health_socioeconomics.py
+++ b/tryton/health_socioeconomics/health_socioeconomics.py
@@ -203,7 +203,7 @@
     @fields.depends('fam_apgar_help', 'fam_apgar_timesharing',
         'fam_apgar_discussion', 'fam_apgar_decisions', 'fam_apgar_affection')
     def on_change_with_fam_apgar_score(self):
-        fam_apgar_help = int(self.fam_apgar_help)
+        fam_apgar_help = int(self.fam_apgar_help or '0')
         fam_apgar_timesharing = int(self.fam_apgar_timesharing or '0')
         fam_apgar_discussion = int(self.fam_apgar_discussion or '0')
         fam_apgar_decisions = int(self.fam_apgar_decisions or '0')