Skip to content

Commit

Permalink
Return list if catalog is not found instead of None
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunga001 committed Nov 7, 2023
1 parent 53a5280 commit 07952f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bika/lims/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ def get_catalogs_for(brain_or_object, default=PORTAL_CATALOG):
# AT content type
# => Looup via archetype_tool
archetype_tool = get_tool("archetype_tool")
catalogs = archetype_tool.catalog_map.get(portal_type)
catalogs = archetype_tool.catalog_map.get(portal_type) or []
else:
# DX content type
# => resolve the `_catalogs` attribute from the class
Expand Down

0 comments on commit 07952f7

Please sign in to comment.