Commit 1af36afd authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Apply Contract Invitation to Persons cloud contract

parent ca579dae
...@@ -5,9 +5,7 @@ if REQUEST is not None: ...@@ -5,9 +5,7 @@ if REQUEST is not None:
portal = context.getPortalObject() portal = context.getPortalObject()
web_site = context.getWebSiteValue() web_site = context.getWebSiteValue()
if token: if token:
raise
error = "" error = ""
try: try:
invitation_token = portal.invitation_token_module[token] invitation_token = portal.invitation_token_module[token]
...@@ -49,6 +47,9 @@ if confirmation_required and not person_is_new: ...@@ -49,6 +47,9 @@ if confirmation_required and not person_is_new:
if target_language is None: if target_language is None:
target_language = portal.Localizer.get_selected_language() target_language = portal.Localizer.get_selected_language()
if token:
person.Person_applyContractInvitation(invitation_token)
subscription_request = context.subscription_request_module.newContent( subscription_request = context.subscription_request_module.newContent(
portal_type="Subscription Request", portal_type="Subscription Request",
destination_section_value=person, destination_section_value=person,
......
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