Edgewall Software
Modify

Ticket #3557 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: steffenp@… Owned by: cboos
Priority: normal Milestone: 0.10
Component: general Version: devel
Severity: minor Keywords:
Cc:
Release Notes:
API 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

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

Download all attachments as: .zip

Change History

Changed 5 years ago by steffenp@…

Explictly convert types

comment:1 Changed 5 years ago by cboos

  • Milestone changed from 0.10 to 0.10.1
  • Owner changed from jonas to cboos
  • Severity changed from normal to minor

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 Changed 5 years ago by cmlenz

  • Milestone changed from 0.10.1 to 0.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 Changed 5 years ago by cboos

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

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.