-
Notifications
You must be signed in to change notification settings - Fork 2
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
datetime converter breaks dexterity content types with datetime fields #4
Comments
@vladimir-iliev @vipod what problem did you solve by adding this converter? |
@frisi I think @vladimir-iliev got an answer here. But I'm not sure if he is still active here. So if we do not get reply in couple of days - feel free to make you decision. |
adding timezone information makes sense. tests pass without the overrides.zcml (it was not even loaded for the test environment) but saving notices lead to an error (catalog only allows dates with timezone info) @vipod would be great if you can review the PR so i can make a release (if that's ok with you) |
@frisi It looks like we changed datetime field value types we store in database. Don't we need also to add some kind of migration profile for this change? Would existing collective.notices installations still work after upgrade? |
hey @vipod - thanks for you feedback! actually there is no migration needed. old entries already have timezone info, new entries will have them automatically too. after adding my changes there is no need to manually add the timezone for test-content (see changes in the test.py) from my point of view existing installations will still work fine. |
@frisi ok, thank you for explanation! |
you're welcome. |
Can you do this? I guess you got all the necessary permissions here and at pypy? |
i guess so, too! will do! |
the converter introduced in this commit: e8a169b
breaks dexterity content with datetime fields: (ie from the plone.app.dexterity.behaviors.metadata.IPublication behaviour)
z3c.form checks if the widget value has been changed, and the converter installed here returns a timezone-aware datetime object and the datamanager returns the attribute stored for this behaviour without a timezone.
The text was updated successfully, but these errors were encountered: