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

empty richtext shouldn't be None #41

Open
iham opened this issue Jun 24, 2020 · 0 comments
Open

empty richtext shouldn't be None #41

iham opened this issue Jun 24, 2020 · 0 comments

Comments

@iham
Copy link
Member

iham commented Jun 24, 2020

whenever you create a type using a Richtext field, leaving it empty doesn't create a RichtextValue, so you can't simply ask the field for it's raw or output value.

so each time using it, you need to test if the field is there and it isn't "None".
no fun in templates nor in code.

A richtext field should be an empty richtextvalue, not "None".
because then you can ask the field for its raw or output value.
and if this is an empty string -> fine: don't display it (according to your templates needs)

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

No branches or pull requests

1 participant