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

Handle description as being a RichText field #131

Open
gforcada opened this issue Apr 24, 2020 · 0 comments
Open

Handle description as being a RichText field #131

gforcada opened this issue Apr 24, 2020 · 0 comments

Comments

@gforcada
Copy link
Member

At least on plone.dexterity.content.DexterityContent.Description method it does fail due to calling replace on it.

A try/except might be enough?

try:
    value = value.replace('\r\n', ' ').replace('\r', ' ').replace('\n', ' ')  # noqa
except AttributeError:
    value = value.raw.replace('\r\n', ' ').replace('\r', ' ').replace('\n', ' ')  # noqa
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