Skip to content

Commit 77b3bf6

Browse files
authored
nobug fix lint (#737)
1 parent ae92af2 commit 77b3bf6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

compliance-api/src/compliance_api/services/inspection_record/inspection_record_doc_generator.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,15 @@ def add_html_table_to_container(container, table_element):
338338

339339
# Apply width at XML level
340340
tbl = docx_table._element
341-
tblPr = tbl.tblPr
342-
if tblPr is None:
343-
tblPr = OxmlElement('w:tblPr')
344-
tbl.insert(0, tblPr)
345-
346-
tblW = OxmlElement('w:tblW')
347-
tblW.set(qn('w:w'), str(int(table_width_emu / 635)))
348-
tblW.set(qn('w:type'), 'dxa')
349-
tblPr.append(tblW)
341+
table_props = tbl.tblPr
342+
if table_props is None:
343+
table_props = OxmlElement('w:tblPr')
344+
tbl.insert(0, table_props)
345+
346+
table_width = OxmlElement('w:tblW')
347+
table_width.set(qn('w:w'), str(int(table_width_emu / 635)))
348+
table_width.set(qn('w:type'), 'dxa')
349+
table_props.append(table_width)
350350

351351
# Populate table
352352
for row_idx, tr in enumerate(rows):

0 commit comments

Comments
 (0)