Commit d4f60b7c authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: source value may be none

parent 992b261b
Pipeline #11181 failed with stage
in 0 seconds
...@@ -33,7 +33,7 @@ if source is None: ...@@ -33,7 +33,7 @@ if source is None:
source_person_list = context.Base_getTemplateProxyParameter(parameter="author", source_data=None) or [] source_person_list = context.Base_getTemplateProxyParameter(parameter="author", source_data=None) or []
if not source_person_list and getattr(context, 'getSourceDecisionValue', None): if not source_person_list and getattr(context, 'getSourceDecisionValue', None):
source_person_candidate = context.getSourceDecisionValue() source_person_candidate = context.getSourceDecisionValue()
if source_person_candidate.getPortalType() == "Person": if source_person_candidate and source_person_candidate.getPortalType() == "Person":
source_person_list = [source_person_candidate] source_person_list = [source_person_candidate]
if source_person_list: if source_person_list:
source_person = source_person_list[0] source_person = source_person_list[0]
...@@ -59,7 +59,7 @@ if source is None: ...@@ -59,7 +59,7 @@ if source is None:
break break
if not source_organisation_list and getattr(context, 'getSourceDecisionValue', None): if not source_organisation_list and getattr(context, 'getSourceDecisionValue', None):
source_organisation_candidate = context.getSourceDecisionValue() source_organisation_candidate = context.getSourceDecisionValue()
if source_organisation_candidate.getPortalType() == "Organisation": if source_organisation_candidate and source_organisation_candidate.getPortalType() == "Organisation":
source_organisation_list = [source_organisation_candidate] source_organisation_list = [source_organisation_candidate]
if source_organisation_list: if source_organisation_list:
source_organisation = source_organisation_list[0] source_organisation = source_organisation_list[0]
......
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