Commit 9c2a1e4e authored by Yusei Tahara's avatar Yusei Tahara

Don't raise exception if dms preference is not configured.

getPropertyDictFromFileName is used in business templates besides dms.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19924 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de888ce1
......@@ -404,8 +404,8 @@ class ContributionTool(BaseTool):
regex_text = self.portal_preferences.getPreferredDocumentFileNameRegularExpression()
if regex_text in ('', None):
# we must have file name regular expression defined in preferences
raise ValueError, '[DMS] No file name regular expression defined in preferences.'
return property_dict
if regex_text:
pattern = re.compile(regex_text)
if pattern is not None:
......
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