Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3557 closed defect (fixed)

attachment.select() sets wrong type for size and time field

Reported by: steffenp@… Owned by: Christian Boos
Priority: normal Milestone: 0.10
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In attachment.select() time and size are not converted to int whereas attachment._fetch() explicitly converts the values.

See the attached patch for a fix.

Attachments (1)

attachment-type-conversion-fix-svn3612.patch (639 bytes ) - added by steffenp@… 18 years ago.
Explictly convert types

Download all attachments as: .zip

Change History (4)

by steffenp@…, 18 years ago

Explictly convert types

comment:1 by Christian Boos, 18 years ago

Milestone: 0.100.10.1
Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor

Well, those columns are declared as 'int' in the data model, so I wonder if the fix shouldn't be instead the removal of the conversion in _fetch()… or did you actually ran into a problem when those conversions were missing in select()?

comment:2 by Christopher Lenz, 18 years ago

Milestone: 0.10.10.10

AFAIK they need to be explicitly converted to int to avoid having floats in the DB when using SQLite. See for example [3524].

I think it would be a good idea to get this into 0.10, because floats in the DB are not easy to recover from (see the various tickets about invalid literal for int()).

comment:3 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

Ok, did so in r3615. I also made sure we store those values as integers in the first place.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.