From aa2448888d79939b880288e8d6d85d729940251c Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Sun, 9 Jul 2017 07:57:48 +0700 Subject: [PATCH] continue to copy nurse from prev cycle item even not blank line of nurse --- netforce_clinic/models/visit.py | 4 ++++ 1 file changed, 4 insertions(+) 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,