Skip to content

Conversation

@ramonski
Copy link
Contributor

Description of the issue/feature this PR addresses

This PR adds an additional lookup for ZCatalog brains to fetch the right catalog for metadata lookup.

Current behavior before PR

If no catalog request parameter is present, the JSON API always uses portal_catalog to fetch the brain metadata.

Desired behavior after PR is merged

If no catalog request parameter is present, the JSON API looks up the mapped catalogs for the portal type and returns the first found catalog from there for metadata lookup.

--
I confirm I have tested the PR thoroughly and coded it according to PEP8
standards.

@ramonski ramonski requested a review from xispa March 21, 2023 15:16
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are overwriting the catalog variable passed through the request

@xispa xispa merged commit a594794 into 2.x Mar 23, 2023
@xispa xispa deleted the brain-catalog-lookup branch March 23, 2023 04:47
@ramonski ramonski mentioned this pull request Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants