added is instance check for data sa_output_to_docx
This commit is contained in:
parent
2768b6d1b5
commit
ba265ca0fb
|
@ -11301,6 +11301,10 @@ def sa_output_to_docx(df,output_docx,output_template):
|
||||||
|
|
||||||
pos = df['Identification_Status'][index]
|
pos = df['Identification_Status'][index]
|
||||||
data = df['data'][index]
|
data = df['data'][index]
|
||||||
|
|
||||||
|
if not isinstance(data, str):
|
||||||
|
data = ''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print(index,data)
|
print(index,data)
|
||||||
except:
|
except:
|
||||||
|
@ -11364,7 +11368,8 @@ def sa_output_to_docx(df,output_docx,output_template):
|
||||||
paragraph_format.space_after = Pt(0)
|
paragraph_format.space_after = Pt(0)
|
||||||
|
|
||||||
paragraph_format.line_spacing = Pt(12)
|
paragraph_format.line_spacing = Pt(12)
|
||||||
if data.strip():
|
# if data.strip():
|
||||||
|
if isinstance(data, str) and data.strip():
|
||||||
para.text = data[15:]
|
para.text = data[15:]
|
||||||
else:
|
else:
|
||||||
para.text = ''
|
para.text = ''
|
||||||
|
|
Loading…
Reference in New Issue