Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fallback to sample client field value #2366

Merged
merged 5 commits into from
Aug 27, 2023
Merged

Conversation

ramonski
Copy link
Contributor

Description of the issue/feature this PR addresses

This PR changes the getClient method of samples to lookup the field value first before traversing the acquisition chain.

Current behavior before PR

The acquisition chain of the sample is used to retrieve the client contact

Desired behavior after PR is merged

The field value of the sample is used first

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@ramonski ramonski requested a review from xispa August 27, 2023 10:23
@ramonski ramonski changed the title Avoid acquisition chain traversal when getting the sample client Add fallback to sample client field value Aug 27, 2023
@xispa xispa merged commit 902ec0a into 2.x Aug 27, 2023
2 checks passed
@xispa xispa deleted the sample-get-client-method branch August 27, 2023 12:26
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.

2 participants