From 6b41cc25799433fb2aa6be40dc38067bc5a82107 Mon Sep 17 00:00:00 2001 From: wafi543 Date: Mon, 19 Apr 2021 14:17:38 +0300 Subject: [PATCH] continued fix #345 --- docxtpl/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index a199ec1..1b528a4 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -360,6 +360,7 @@ class DocxTemplate(object): ids.append(id) else: docPr.set('id', str(int(id)+amount)) + amount += 1000 elif alternative is not None: choice = alternative.find(mc+'Choice') drawing = choice.find(ns+'drawing') @@ -372,6 +373,7 @@ class DocxTemplate(object): ids.append(id) else: docPr.set('id', str(int(id)+amount)) + amount += 1000 elif inline is not None: docPr = inline.find(nsp+'docPr') id = docPr.attrib['id'] @@ -379,6 +381,7 @@ class DocxTemplate(object): ids.append(id) else: docPr.set('id', str(int(id)+amount)) + amount += 1000 return tree # using of TC tag in for cycle can cause that count of columns does not