Mercurial > hgweb > health
changeset 2364:d4404b5bec91 stable
health_calendar : Fix bug #46953: Error on creating appointment if healthprof.name.internal_user == None
| author | Luis Falcon <falcon@gnu.org> |
|---|---|
| date | Sun, 24 Jan 2016 01:55:58 +0700 |
| parents | 11dbd8f7bf62 |
| children | 72dd3e8e2dd3 |
| files | tryton/health_calendar/health_calendar.py |
| diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health_calendar/health_calendar.py +++ b/tryton/health_calendar/health_calendar.py @@ -59,7 +59,8 @@ if values['state'] == 'confirmed': if values['healthprof']: healthprof = Healthprof(values['healthprof']) - if healthprof.name.internal_user.calendar: + if (healthprof.name.internal_user and + healthprof.name.internal_user.calendar): patient = Patient(values['patient']) appointment_date_end = None if values.get('appointment_date_end'):
