Commit f132a2bd authored by Ivan Tyagov's avatar Ivan Tyagov

Raise exception if it can not find in preferences filename re expression pattern.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14588 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d6389efd
......@@ -318,6 +318,9 @@ class ContributionTool(BaseTool):
return {}
property_dict = {}
rx_src = self.portal_preferences.getPreferredDocumentFileNameRegularExpression()
if rx_src in ('', None):
# we must have file name regular expression defined in preferences
raise ValueError, '[DMS] No file name regular expression defined in preferences.'
if rx_src:
rx_parse = re.compile(rx_src)
if rx_parse 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