Commit f0579d3c authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

core: stop using deprecated getParent()

parent 76092438
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -1751,11 +1751,11 @@ class Base( ...@@ -1751,11 +1751,11 @@ class Base(
"""Returns the parent of the current object (whereas it should return the """Returns the parent of the current object (whereas it should return the
relative_url of the parent for consistency with CMFCategory. 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. uses getParent instead of getParentValue. This may change in the future.
""" """
warnings.warn("getParent implementation still returns the parent object, "\ 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) "Use getParentValue instead", FutureWarning)
return self.getParentValue() # Compatibility 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