Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

если осложнения и сопутствующие пустые и несвязные #4623

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions forms/forms106.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)]
Expand Down
Loading