Opened 17 years ago

Closed 17 years ago

Last modified 17 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

Description

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 by Russell Keith-Magee, 17 years ago

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 by Bastian Kleineidam <calvin@…>, 17 years ago

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
test.

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

by Bastian Kleineidam <calvin@…>, 17 years ago

Attachment: lazydate-no-isinstance.diff added

comment:3 by Russell Keith-Magee, 17 years ago

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 by Russell Keith-Magee, 17 years ago

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