Skip to content

Commit

Permalink
Fix missing portal type in query (#58)
Browse files Browse the repository at this point in the history
* Fix missing portal type in query

* Changelog updated
  • Loading branch information
ramonski committed May 19, 2023
1 parent d8b9cb3 commit e6298cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
2.5.0 (unreleased)
------------------

- #58 Fix missing portal type in query
- #57 Fix search catalog for metadata lookup
- #56 Fix implicit imports for controlpanel mappings
- #54 Lookup mapped catalogs for CatalogBrains
Expand Down
3 changes: 3 additions & 0 deletions src/senaite/jsonapi/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def __init__(self, context, portal_type=None):
def search(self, query):
"""search the catalog
"""
# always extend the query with the portal_type
if self.portal_type:
query["portal_type"] = self.portal_type
logger.info("Catalog query={}".format(query))
catalog = self.get_catalog()
if not catalog:
Expand Down

0 comments on commit e6298cf

Please sign in to comment.