Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2993 closed defect (fixed)

changeset 3960 broke Datefields and LazyDate()

Reported by: Matthew Flanagan <mattimustang@…> Owned by: russellm
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: UI/UX:


Attachments (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by russellm

  • Owner changed from adrian to russellm

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

comment:2 Changed 9 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 9 years ago by Bastian Kleineidam <calvin@…>

comment:3 Changed 9 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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 9 years ago by russellm

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