diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py index 074fb11..7f4570b 100644 --- a/netforce_clinic/models/visit.py +++ b/netforce_clinic/models/visit.py @@ -300,7 +300,11 @@ class Visit(Model): for item2 in get_model("clinic.cycle.item").search_browse(dom): lines=[] for line in item2.lines: + if not line: + continue nr=line.nurse_id + if not nr: + continue dpt=line.department_id lines.append(('create', { 'nurse_id': nr.id,