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,14 +422,14 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
uninstalled_list = []
portal = self.portal
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)
uninstalled_list.append(bt.getTitle())
getattr(portal, 'ERP5Site_updateTranslationTable', lambda: None)()
uninstalled_list.append(bt_title)
if uninstalled_list:
getattr(portal, 'ERP5Site_updateTranslationTable', lambda: None)()
self.stepTic()
return uninstalled_list
def setUp(self):
'''Sets up the fixture. Do not override,
......
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