Commit fd1cec20 authored by Yusei Tahara's avatar Yusei Tahara

Make sure that catalog knows portal_type column and reference column. If...

Make sure that catalog knows portal_type column and reference column. If catalog does not know those columns, then it will fetch all cataloged objects and will cause memory bloat. This can happen when MariaDB server disk is full.
parent 7775c2dc
......@@ -69,6 +69,8 @@ def getUserByLogin(portal, login, exact_match=True):
reference_key = 'ExactMatch'
else:
reference_key = 'Keyword'
if not (portal.portal_catalog.hasColumn('portal_type') and portal.portal_catalog.hasColumn('reference')):
raise RuntimeError('Catalog does not have column information. Make sure RDB is working and disk is not full.')
result = portal.portal_catalog.unrestrictedSearchResults(
select_expression='reference',
portal_type="Person",
......
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