Commit 807a4ac5 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Only set SITE prefix if organisation has a specific role

parent 1a4b40b8
portal = context.getPortalObject() portal = context.getPortalObject()
reference = "SITE-%s" % portal.portal_ids.generateNewId( if context.getRole() == "host":
reference_prefix = "SITE"
else:
reference_prefix = "O"
reference = "%s-%s" % (reference_prefix, portal.portal_ids.generateNewId(
id_group='slap_organisation_reference', id_group='slap_organisation_reference',
id_generator='uid') id_generator='uid'))
context.edit(reference=reference) context.edit(reference=reference)
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