Edgewall Software

Ticket #3557: attachment-type-conversion-fix-svn3612.patch

File attachment-type-conversion-fix-svn3612.patch, 639 bytes (added by steffenp@…, 6 years ago)

Explictly convert types

  • trac/attachment.py

     
    219219            attachment = Attachment(env, parent_type, parent_id) 
    220220            attachment.filename = filename 
    221221            attachment.description = description 
    222             attachment.size = size 
    223             attachment.time = time 
     222            attachment.size = size and int(size) or 0 
     223            attachment.time = time and int(time) or 0 
    224224            attachment.author = author 
    225225            attachment.ipnr = ipnr 
    226226            yield attachment