Commit 250f0213 authored by Nicolas Delaby's avatar Nicolas Delaby

Bug fix, first position is always 1

parent faeba42b
......@@ -456,7 +456,7 @@ class ERP5Diff:
len_all_similar_sibling = len(element.findall('../%s' % element.tag))
if len_all_similar_sibling > 1:
position = len_all_similar_sibling - len(list(element.itersiblings(tag=element.tag)))
path_list.append('%s[%d]' % (element.xpath('name()'), position-before))
path_list.append('%s[%d]' % (element.xpath('name()'), position-before or 1))
else:
path_list.append(element.xpath('name()'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment