Commit ce7c055f authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: do not crash when using a zope user

parent 7389ccd0
...@@ -47,11 +47,14 @@ if portal_type in ["Instance Tree Module", "Instance Tree", "Person"] and \ ...@@ -47,11 +47,14 @@ if portal_type in ["Instance Tree Module", "Instance Tree", "Person"] and \
portal.portal_preferences.getPreferredCloudContractEnabled(): portal.portal_preferences.getPreferredCloudContractEnabled():
person = portal.portal_membership.getAuthenticatedMember().getUserValue() person = portal.portal_membership.getAuthenticatedMember().getUserValue()
contract = portal.portal_catalog.getResultValue( if person is None:
portal_type="Cloud Contract", contract = None
default_destination_section_uid=person.getUid(), else:
validation_state=['validated'], contract = portal.portal_catalog.getResultValue(
) portal_type="Cloud Contract",
default_destination_section_uid=person.getUid(),
validation_state=['validated'],
)
if contract is None: if contract is None:
msg = context.Base_translateString( msg = context.Base_translateString(
......
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