Commit 90464f50 authored by Nicolas Delaby's avatar Nicolas Delaby

no need to use try except assertion with fallback parameter

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35826 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 83515e21
......@@ -1045,10 +1045,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
object_id = xml.get('id')
if object_id is not None:
if sub_object is None:
try:
sub_object = object._getOb(object_id)
except (AttributeError, KeyError, TypeError):
sub_object = None
sub_object = object._getOb(object_id, None)
if sub_object is None: # If so, it doesn't exist
portal_type = ''
if xml.xpath('local-name()') == self.xml_object_tag:
......
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