Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Cannot override Patients listing behavior with subscriber adapters #163

Merged
merged 1 commit into from
Jan 13, 2020

Conversation

xispa
Copy link
Member

@xispa xispa commented Jan 12, 2020

Description of the issue/feature this PR addresses

PatientsView is used as the "root" listing view for Patients listings. Since it overrides the function before_render, some of the changes made in subscriber adapters from another add-ons are omitted. For instance, trying to modify self.context_actions via subscriber adapters won't have any effect because after the call, the value is overrided in PatientsView.

This Pull Request moves the logic before_render from the base class PatientsView to the function update.

Current behavior before PR

Cannot override some behavior (e.g., context_actions) of PatientsView listing by using subscriber adapters.

Desired behavior after PR is merged

Can override behavior of PatientsView listing by using subscriber adapters.

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

`PatientsView` is used as the "root" listing view for Patients listings. Since
it overrides the function `before_render`, some of the changes made in
subscriber adapters from another add-ons are omitted. For instance, trying to
modify `self.context_actions` via subscriber adapters won't have any effect
because after the call, the value is overrided in PatientsView.

This Pull Request moves the logic `before_render` from the base class
`PatientsView` to the function `update`.
@xispa xispa requested a review from ramonski January 12, 2020 21:28
@ramonski ramonski merged commit 24ba4ea into master Jan 13, 2020
@ramonski ramonski deleted the before-render-patients branch January 13, 2020 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants