-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Collection "Event End Date: after today" criterion error #179 #3959
Comments
@sauzher This may have been fixed in zopefoundation/DateTime#61. You didn't say a specific version of Plone or DateTime that you were using. |
@davisagli I'm facing the problem in plone 5.2.13, DateTime 4.9. but the same happens in Plone 6.0.11 (6022) and Plone 6.10 DateTime 5.3 Thanks. |
@sauzher it was fixed in DateTime 5.4, according to the last comment in the issue that @davisagli linked. The latest Plone |
@davisagli @stevepiercy ,
|
@sauzher Based on the traceback, it looks like a datetime instance was passed in to DateTime.lessThanEqualTo. Based on the docstring in https://github.com/zopefoundation/DateTime/blob/5.4/src/DateTime/DateTime.py#L1352, it expects a DateTime instance or a float. So I guess the bug is that plone.app.event is passing the wrong type. |
@davisagli I agree, actually I've monkey patched |
|
ok it's not the ret_mode but the collections query: I think it would be best if this method https://github.com/plone/plone.app.event/blob/master/plone/app/event/browser/event_listing.py#L217 always returns |
This one adds a test and fixes this issue: plone/plone.app.event#404 Though I saw this older PR (too late) trying to achieve the same thing: plone/plone.app.event#397 ... sorry @ThibautBorn maybe you want to look at my PR and we can merge our solutions together? |
@petschki , Your fix achieved the same thing as my PR for the conversion part, and with tests so I'm glad it's merged. I was however also expanding on the usecase by refactoring the code and implementing some new logic. This isn't addressed here, so I made a new issue where this can be discussed. plone/plone.app.event#405 |
Steps to reproduce:
Create events whose end date is in the future
Create a collection and set criteria: "Event End Date -> After Today"
Got Traceback error.
In plone 6 it is:
In plone 5 I get a slightly different error:
The text was updated successfully, but these errors were encountered: