Commit 55396821 authored by Vincent Pelletier's avatar Vincent Pelletier

Long overdue quick hack to prevent business template system from importing...

Long overdue quick hack to prevent business template system from importing non-xml files. This is consistent with the not-less-quickhack user for object naming which just strips the 4 last characters of the filename, and will fix the case of accidental import of backup files (Foo.xml~) which led to creation of "Foo." objects.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15136 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b1385cfc
......@@ -536,6 +536,9 @@ class ObjectTemplateItem(BaseTemplateItem):
def _importFile(self, file_name, file):
# import xml file
if not file_name.endswith('.xml'):
LOG('Business Template', 0, 'Skipping file "%s"' % (file_name, ))
return
obj = self
connection = None
while connection is 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