Roundup Tracker - Issues

Message3546

Author stefan
Recipients richard, stefan
Date 2009-02-16.20:18:06
Message-id <1234815487.6.0.739033668847.issue2550504@psf.upfronthosting.co.za>
In-reply-to
When submitting form requests containing multiple values where only a
single value is expected, an (internal) AttributeError is raised, e.g.:

File "roundup/cgi/templating.py", line 538, in __getitem__
    value = form[item].value.strip()
AttributeError: 'list' object has no attribute 'value'

A way to deal with this problem is to rewrite

form[item].value

as

form.getfirst(item)

(This also solves http://psf.upfronthosting.co.za/roundup/meta/issue111
in a cleaner way than has been done before.)

Please find attached a patch, containing a) a new test generating the
exception, and b) a couple of fixes like the above, making the failure
from a) disappear.

OK to check in ?
History
Date User Action Args
2009-02-16 20:18:07stefansetmessageid: <1234815487.6.0.739033668847.issue2550504@psf.upfronthosting.co.za>
2009-02-16 20:18:07stefansetrecipients: + stefan, richard
2009-02-16 20:18:07stefanlinkissue2550504 messages
2009-02-16 20:18:06stefancreate