Only update translation table if BTs were actually uninstalled

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32374 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e60ddfa
...@@ -422,15 +422,15 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase): ...@@ -422,15 +422,15 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
uninstalled_list = [] uninstalled_list = []
portal = self.portal portal = self.portal
for bt in portal.portal_templates.getInstalledBusinessTemplateList(): for bt in portal.portal_templates.getInstalledBusinessTemplateList():
if bt.getTitle() in template_list: bt_title = bt.getTitle()
if bt_title in template_list:
bt.uninstall(remove_translations=True) bt.uninstall(remove_translations=True)
uninstalled_list.append(bt.getTitle()) uninstalled_list.append(bt_title)
if uninstalled_list:
getattr(portal, 'ERP5Site_updateTranslationTable', lambda: None)() getattr(portal, 'ERP5Site_updateTranslationTable', lambda: None)()
self.stepTic() self.stepTic()
return uninstalled_list return uninstalled_list
def setUp(self): def setUp(self):
'''Sets up the fixture. Do not override, '''Sets up the fixture. Do not override,
use the hooks instead. use the hooks instead.
......
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