Correction for warning:
"/osv/orm.py:1964: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if next:"
This commit is contained in:
1 parent
5c747aca98
commit
d951bf78b5
1 file changed
+1
-1
+1
-1
@@ -1961,7 +1961,7 @@ class ORM(object):
|
||||
elif pos == 'after':
|
||||
parent = element.getparent()
|
||||
next = element.getnext()
|
||||
if next:
|
||||
if next is not None:
|
||||
for child in element2:
|
||||
index = parent.index(next)
|
||||
parent.insert(index - 1, child)
|
||||
|
||||
Reference in new issue
Block a user