[web2py] Re: empty list:reference seems like a bug

2011-02-07 Thread Joe Barnhart
OK, just as a hack, I changed the code in SQLTABLE from: r = field.represent(r) To: r = field.represent(r or []) This eliminates the crash in the database administrator due to the list:reference field. I hesitate to suggest this as a fix for the issue because my understanding of this c

[web2py] Re: empty list:reference seems like a bug

2011-02-07 Thread Joe Barnhart
I just ran into a similar problem... I think. I defined a list:reference field like so: Field("teams","list:reference team",label='Teams attending') The problem is that after I inserted one record (with no entries in the 'teams' field, I now get an error whenever I try to use the database ad

[web2py] Re: empty list:reference seems like a bug

2011-01-29 Thread LightOfMooN
I add this rolic using "database administration -> add rolic" On 29 янв, 03:07, DenesL wrote: > On Jan 28, 4:47 pm, LightOfMooN wrote: > > > Running 1.91.6 too. > > > db.define_table('tag', > >     Field('name', 'string'), format='%(name)s') > > > db.define_table('rolic', > >     Field('name', '

[web2py] Re: empty list:reference seems like a bug

2011-01-28 Thread Massimo Di Pierro
Can you please try trunk? On Jan 28, 3:47 pm, LightOfMooN wrote: > Running 1.91.6 too. > > db.define_table('tag', >     Field('name', 'string'), format='%(name)s') > > db.define_table('rolic', >     Field('name', 'string'), >     Field('tags', 'list:reference tag', required=True), >     ) > > Add

[web2py] Re: empty list:reference seems like a bug

2011-01-28 Thread DenesL
On Jan 28, 4:47 pm, LightOfMooN wrote: > Running 1.91.6 too. > > db.define_table('tag', >     Field('name', 'string'), format='%(name)s') > > db.define_table('rolic', >     Field('name', 'string'), >     Field('tags', 'list:reference tag', required=True), >     ) > > Add 1 rolic with empty tags,

[web2py] Re: empty list:reference seems like a bug

2011-01-28 Thread LightOfMooN
Running 1.91.6 too. db.define_table('tag', Field('name', 'string'), format='%(name)s') db.define_table('rolic', Field('name', 'string'), Field('tags', 'list:reference tag', required=True), ) Add 1 rolic with empty tags, and "database administration -> db.rolic" goes to error: Pro

[web2py] Re: empty list:reference seems like a bug

2011-01-28 Thread DenesL
I have a table with empty list:reference fields and db admin does not have a problem with it. Running 1.91.6 . On Jan 28, 10:12 am, LightOfMooN wrote: > It's a problem, that if i have empty list:reference, the standard > database administration don't work because of wrong query: > > Traceback (