Commit ed8cdbd5 authored by Bartek Górny's avatar Bartek Górny

trap exception in ingestion if no data; fix display of related value if relation is None (#93)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11440 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6764aece
......@@ -24,6 +24,7 @@ rx_classif=re.compile('([A-Z]{1}[a-z]+/[A-Z]{1}[a-z]+)')
def getAttrFromContent(self,data,ptype):
if ptype!='Memo':return {}
atrs={}
if data is None:return {}
fileno=rx_fileno.search(data)
if fileno:
dic=fileno.groupdict()
......
......@@ -71,6 +71,7 @@
<value> <string># get related object title in a security-aware way (without throwing exception\n
# if I don\'t have permissions to access the object)\n
cat_value=context.getProperty(category)\n
if cat_value is None:return \'\'\n
ob=context.restrictedTraverse(cat_value,None)\n
return ob is not None and ob.getTitle() or \'\'\n
</string> </value>
......
341
\ No newline at end of file
344
\ No newline at end of file
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