Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2993 closed defect (fixed)

changeset 3960 broke Datefields and LazyDate()

Reported by: Matthew Flanagan <mattimustang@…> Owned by: Russell Keith-Magee
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Attachments (1)

lazydate-no-isinstance.diff (1011 bytes) - added by Bastian Kleineidam <calvin@…> 13 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 13 years ago by Russell Keith-Magee

Owner: changed from Adrian Holovaty to Russell Keith-Magee

Sorry - didn't get a chance to work on this bug when I said I would. RSN, I promise :-)

comment:2 Changed 13 years ago by Bastian Kleineidam <calvin@…>

I attached a quick fix that at least got LazyDate() working again. The crux is that LazyDate
is not a datetime.* instance - it is a plain object, proxying __getattr__
to datetime. So the introduced isinstance() tests do not apply. The patch switches back to the old is not None

For reference, the error message I got was the good old mate can't adapt from PostgreSQL. I love that message ;)

Changed 13 years ago by Bastian Kleineidam <calvin@…>

Attachment: lazydate-no-isinstance.diff added

comment:3 Changed 13 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

Fixes #2993, Refs #2918 -- Reverted [3960]; [3960] fixed a potential data validation problem for SQLite, but broke usage of LazyDate?. The proper fix is to complete the model validators to catch _all_ invalid inputs.

comment:4 Changed 13 years ago by Russell Keith-Magee

I forgot to annotate the fact that the last comment refers to changeset [4105]

Note: See TracTickets for help on using tickets.
Back to Top