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

Returning “None” instead default Value for new fields #267

Open
rristow opened this issue Feb 7, 2018 · 0 comments
Open

Returning “None” instead default Value for new fields #267

rristow opened this issue Feb 7, 2018 · 0 comments

Comments

@rristow
Copy link

rristow commented Feb 7, 2018

If a new field is introduced in the schema, dexterity correctly sets default value for a new object.
On the other side, if I try to get the content of the field for an existing item, it returns the value “None”.
(or if the value of the field is deleted via widget)
This can cause many errors in 3-part code if a string or integer is expected instead of “None”.

Steps to reproduce:

  • Add some dexterity object “obj1”
  • Add a String field “newfield1” in the schema with the default value = “ ”
  • Verify with the code the value of the field: “obj1.newfield1”
  • The value is None
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