Commit be6721a0 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Compatibility between 2.8 and 2.12: allow testing 'some_id in container' also

in 2.8 to avoid failures in 2.8 that pass in 2.12


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43302 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 397cebe5
......@@ -46,3 +46,9 @@ def ObjectManager_importObjectFromFile(self, filepath, verify=1, set_owner=1, id
return ob
ObjectManager._importObjectFromFile=ObjectManager_importObjectFromFile
# BACK: allow using 'some_id in folder' construct in 2.8
def ObjectManager_contains(self, name):
return name in self.objectIds()
if '__contains__' not in ObjectManager.__dict__:
ObjectManager.__contains__ = ObjectManager_contains
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