Merge pull request #177 from nickgashkov/fix/issue-176

Fix #176
This commit is contained in:
Eric Lapouyade 2019-01-24 16:07:41 +01:00 committed by GitHub
commit 3291da7ff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,7 +324,7 @@ class DocxTemplate(object):
def get_cell_len(total, cell):
tc_pr = cell.find(ns + 'tcPr')
grid_span = tc_pr is not None and tc_pr.find(ns + 'gridSpan')
grid_span = None if tc_pr is None else tc_pr.find(ns + 'gridSpan')
if grid_span is not None:
return total + int(grid_span.get(ns + 'val'))