From e8ca2e79ade2fd90c347e501d31a961b9f45bd2d Mon Sep 17 00:00:00 2001 From: sergei kasianenko Date: Sun, 12 Jan 2025 18:48:11 +0800 Subject: [PATCH] =?UTF-8?q?=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BE=D1=81=D0=BB?= =?UTF-8?q?=D0=BE=D0=B6=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8=20=D1=81?= =?UTF-8?q?=D0=BE=D0=BF=D1=83=D1=82=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D0=B5=20=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B5=D1=81=D0=B2=D1=8F=D0=B7=D0=BD=D1=8B=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- forms/forms106.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/forms/forms106.py b/forms/forms106.py index 6f32ffc15d..db65eaa261 100644 --- a/forms/forms106.py +++ b/forms/forms106.py @@ -1332,6 +1332,7 @@ def form_02(request_data): def check_section_param(objs, styles_obj, section, tbl_specification, cda_titles): + default_empty_table_data = Paragraph("", styles_obj[section.get("style")]) if section.get("Spacer"): height_spacer = section.get("spacer_data") objs.append(Spacer(1, height_spacer * mm)) @@ -1342,14 +1343,18 @@ def check_section_param(objs, styles_obj, section, tbl_specification, cda_titles objs.append(tbl_specification.get("operation")) elif section.get("type") == "Движение": objs.append(Paragraph(tbl_specification.get("transfers"), styles_obj[section.get("style")])) + elif section.get("type") == "Сопутствующие": - objs.append(tbl_specification.get("Сопутствующие")) + objs.append(tbl_specification.get("Сопутствующие") if tbl_specification.get("Сопутствующие") else default_empty_table_data) + elif section.get("type") == "Осложнения": - objs.append(tbl_specification.get("Осложнения")) + objs.append(tbl_specification.get("Осложнения") if tbl_specification.get("Осложнения") else default_empty_table_data) + elif section.get("type") == "в.э.-Сопутствующие табл": - objs.append(tbl_specification.get("в.э.-Сопутствующие табл")) + objs.append(tbl_specification.get("в.э.-Сопутствующие табл") if tbl_specification.get("в.э.-Сопутствующие табл") else default_empty_table_data) + elif section.get("type") == "в.э.-Осложнения табл": - objs.append(tbl_specification.get("в.э.-Осложнения табл")) + objs.append(tbl_specification.get("в.э.-Осложнения табл") if tbl_specification.get("в.э.-Осложнения табл") else default_empty_table_data) elif section.get("text"): cda_titles_sec = section.get("cdaTitles") data_cda = [cda_titles.get(i) for i in cda_titles_sec if cda_titles.get(i)]