Commit e921bbca authored by Jérome Perrin's avatar Jérome Perrin

core: stop using deprecated getParent()

parent d4e7a3d2
......@@ -118,7 +118,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x, x) for x in here.getParent().getManagedRoleList()]</string> </value>
<value> <string>python: [(x, x) for x in here.getParentValue().getManagedRoleList()]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -1751,11 +1751,11 @@ class Base(
"""Returns the parent of the current object (whereas it should return the
relative_url of the parent for consistency with CMFCategory.
This method still uses this behaviour, because some part of the code still
This method still uses this behavior, because some part of the code still
uses getParent instead of getParentValue. This may change in the future.
"""
warnings.warn("getParent implementation still returns the parent object, "\
"which is inconsistant with CMFCategory API. "\
"which is inconsistent with CMFCategory API. "\
"Use getParentValue instead", FutureWarning)
return self.getParentValue() # Compatibility
......
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