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 api.content.get_parents #531

Open
davisagli opened this issue Feb 27, 2024 · 2 comments · May be fixed by #560
Open

Add api.content.get_parents #531

davisagli opened this issue Feb 27, 2024 · 2 comments · May be fixed by #560

Comments

@davisagli
Copy link
Member

It would be nice to provide an API for iterating through all of an object's parents. It can be implemented using Acquisition.aq_chain

Nice to have: Provide a way to filter the parents for ones that implement a particular interface or match a predicate. Provide a way to get the closest parent that matches these filters (if any).

@yurj
Copy link

yurj commented Jul 1, 2024

https://community.plone.org/t/best-way-to-get-the-object-parent/19633

here some ideas and discussion. In particular we could add an option to get the parent with or without aq_inner.

@rohnsha0 rohnsha0 linked a pull request Feb 19, 2025 that will close this issue
@ale-rt
Copy link
Member

ale-rt commented Feb 20, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants