multiple=True is  afake 1 to many. It stores references as a string '|
1|5|8|' therefore it requires the field to be of type 'string' not int
or reference.

On 15 Lug, 09:51, Rob <[email protected]> wrote:
> I had an existing table defined and just added "multiple=True" to the
> IS_IN_DB statement because I want to convert it from a '1 to 1' to a
> '1 to many'.  So, I had some data in the DB before I set
> 'multiple=True'.
>
> (btw, is there a bug tracker setup so I don't have to spam the group
> with reports?)
>
> I got this traceback:
> Traceback (most recent call last):
>   File "/home/rhd/Desktop/web2py/gluon/restricted.py", line 178, in
> restricted
>     exec ccode in environment
>   File "/home/rhd/Desktop/web2py/applications/list/controllers/
> default.py", line 128, in <module>
>   File "/home/rhd/Desktop/web2py/gluon/globals.py", line 96, in
> <lambda>
>     self._caller = lambda f: f()
>   File "/home/rhd/Desktop/web2py/applications/list/controllers/
> default.py", line 40, in details
>     form = SQLFORM(db.Item, item, upload=URL(r=request,f='download'),
> deletable=True, next=URL(r=request, args=item))
>   File "/home/rhd/Desktop/web2py/gluon/sqlhtml.py", line 708, in
> __init__
>     inp = self.widgets.multiple.widget(field, default)
>   File "/home/rhd/Desktop/web2py/gluon/sqlhtml.py", line 211, in
> widget
>     return OptionsWidget.widget(field, value, **attributes)
>   File "/home/rhd/Desktop/web2py/gluon/sqlhtml.py", line 193, in
> widget
>     return SELECT(*opts, **attr)
>   File "/home/rhd/Desktop/web2py/gluon/html.py", line 338, in __init__
>     self._postprocessing()
>   File "/home/rhd/Desktop/web2py/gluon/html.py", line 1396, in
> _postprocessing
>     values=value.split('|')
> TypeError: 'NoneType' object is not callable

Reply via email to