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

Move replace_link_variables_by_paths function in plone.app.contenttypes.utils to plone.base. Use it in plone.app.z3cform instead of its local clone. #712

Open
yurj opened this issue Nov 14, 2024 · 0 comments

Comments

@yurj
Copy link
Contributor

yurj commented Nov 14, 2024

the function replace_link_variables_by_paths is defined in:
https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/utils.py#L29

There's the same exact function with the same code, defined here:

https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/utils.py#L68

This plone.app.z3cform is used in the converter:

https://github.com/plone/plone.app.z3cform/blob/3bf3c73d7139cd1a2fddeb7aa694e3b7b1734b9e/plone/app/z3cform/converters.py#L524

while https://github.com/plone/plone.restapi/blob/main/src/plone/restapi/serializer/dxfields.py

uses the one from plone.app.contenttypes.utils

A solution could be to move plone.app.contenttypes.utils.replace_link_variables_by_paths to plone.base and remove the one in plone.app.z3cform.

cc: @jensens

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

No branches or pull requests

1 participant