Commit fa9ab050 authored by Titouan Soulard's avatar Titouan Soulard

slapos_panel: do no crash when fetching project

parent 705bb5aa
portal = context.getPortalObject() portal = context.getPortalObject()
checked_permission = 'Access contents information'
if project_relation == 'context': if project_relation == 'context':
project = context project = context
elif project_relation == 'follow_up': elif project_relation == 'follow_up':
project = context.getFollowUpValue() project = context.getFollowUpValue(checked_permission=checked_permission)
elif project_relation == 'destination_project': elif project_relation == 'destination_project':
project = context.getDestinationProjectValue() project = context.getDestinationProjectValue(checked_permission=checked_permission)
elif project_relation == 'source_project': elif project_relation == 'source_project':
project = context.getSourceProjectValue() project = context.getSourceProjectValue(checked_permission=checked_permission)
else: else:
raise ValueError('Unexpected project relation: %s' % project_relation) raise ValueError('Unexpected project relation: %s' % project_relation)
......
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