Commit d6a1af81 authored by Vincent Pelletier's avatar Vincent Pelletier

Tolerate existing organisations.

parent 3dfa03c8
......@@ -587,12 +587,17 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
created_site_list.append(site)
# Create organisation + bank account for each site category.
newContent = self.organisation_module.newContent
organisation_module = self.organisation_module
newContent = organisation_module.newContent
for site in created_site_list:
codification = site.getCodification()
organisation_id = 'site_%s' % (codification, )
try:
organisation_module[organisation_id]
except KeyError:
organisation = newContent(
portal_type='Organisation',
id='site_%s' % (codification, ),
id=organisation_id,
site=site.getRelativeUrl(),
region=site_region_from_codification_dict.get(codification),
group='baobab',
......
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