Commit a038a43e authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: try to get 'en' logo if user language logo is not presented

parent b4c6d186
......@@ -299,13 +299,20 @@ if pass_parameter is not None and pass_source_data is not None:
use_language = context.getLanguage() or "en"
except AttributeError:
use_language = "en"
return populateImageDict(portal_object.portal_catalog(
logo_list = portal_object.portal_catalog(
portal_type="Image",
language=use_language,
validation_state=validation_state,
reference=pass_source_data
))
)
if not logo_list and use_language != "en":
logo_list = portal_object.portal_catalog(
portal_type="Image",
language="en",
validation_state=validation_state,
reference=pass_source_data
)
return populateImageDict(logo_list)
# ------------------------- Product (Website) --------------------------------
if pass_parameter == "product":
......
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