Commit f799d82f authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[ui] Handle case where there is no concept matching the constraint

This triggered a test failure.
parent 2a0a5a84e6af
......@@ -102,7 +102,8 @@ class ContainedSearchForRelatedEntitiesView(rwdg.SearchForRelatedEntitiesView):
if lang in languages:
assert languages, 'no preferred label'
if not languages:
return self._cw.empty_rset()
lang = languages.pop()
# now build the query to prefetch/sort on the preferred label in the proper language
return self._cw.execute(
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