Commit 9d9fbe37 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: return empty list

'NoneType' object is not iterable
parent 6843c16a
...@@ -17,5 +17,5 @@ if organisation_relative_url: ...@@ -17,5 +17,5 @@ if organisation_relative_url:
organisation = context.restrictedTraverse(organisation_relative_url) organisation = context.restrictedTraverse(organisation_relative_url)
return [('', '')] + [(account.getTitle(), account.getRelativeUrl()) for account in organisation.searchFolder(portal_type='Bank Account', sort_on='title')] return [('', '')] + [(account.getTitle(), account.getRelativeUrl()) for account in organisation.searchFolder(portal_type='Bank Account', sort_on='title')]
except Unauthorized: except Unauthorized:
return None return [('', '')]
return None return [('', '')]
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