dossiers: fix tab1 for new patient

This commit is contained in:
Jérôme Schneider 2014-06-13 17:52:07 +02:00
parent f1db8cdd6a
commit c14fdef967
1 changed files with 2 additions and 2 deletions

View File

@ -270,10 +270,10 @@ class PatientRecordGeneralView(cbv.UpdateView):
ctx['last_rdv'] = get_last_rdv(ctx['object'])
ctx['next_rdv'] = get_next_rdv(ctx['object'])
current_state = ctx['object'].get_current_state()
if STATES_MAPPING.has_key(current_state.status.type):
if current_state.status and STATES_MAPPING.has_key(current_state.status.type):
state = STATES_MAPPING[current_state.status.type]
else:
state = current_state.status.name
state = current
ctx['current_state'] = current_state
ctx['status'], ctx['hc_status'] = get_status(ctx, self.request.user)
ctx['missing_policy'] = False