Can you please try trunk?

On Jan 28, 3:47 pm, LightOfMooN <vladsale...@yandex.ru> 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, and "database administration -> db.rolic"
> goes to error:
> ProgrammingError: syntax error at or near ")"
> LINE 1: SELECT  tag.id FROM tag WHERE (tag.id IN ());
>
> ERROR SNAPSHOT
> <class 'psycopg2.ProgrammingError'>(syntax error at or near ")"
> LINE 1: SELECT  tag.id FROM tag WHERE (tag.id IN ());
>                                                   ^
> )
>
> On 29 янв, 00:09, DenesL <denes1...@yahoo.ca> wrote:
>
>
>
>
>
>
>
> > 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 <vladsale...@yandex.ru> wrote:
>
> > > It's a problem, that if i have empty list:reference, the standard
> > > database administration don't work because of wrong query:
>
> > > Traceback (most recent call last):
> > >   File "/home/www-data/web2py/gluon/restricted.py", line 188, in
> > > restricted
> > >     exec ccode in environment
> > >   File "/home/www-data/web2py/applications/funportal/views/
> > > appadmin.html", line 191, in <module>
> > >     <p>
> > >   File "/home/www-data/web2py/gluon/sqlhtml.py", line 1349, in
> > > __init__
> > >     r = field.represent(r)
> > >   File "/home/www-data/web2py/gluon/dal.py", line 3113, in
> > > list_ref_repr
> > >     refs = r._db(r.id.belongs(ids)).select(r.id)
> > >   File "/home/www-data/web2py/gluon/dal.py", line 4507, in select
> > >     return self.db._adapter.select(self.query,fields,attributes)
> > >   File "/home/www-data/web2py/gluon/dal.py", line 1003, in select
> > >     rows = response(sql)
> > >   File "/home/www-data/web2py/gluon/dal.py", line 994, in response
> > >     self.execute(sql)
> > >   File "/home/www-data/web2py/gluon/dal.py", line 1067, in execute
> > >     return self.log_execute(*a, **b)
> > >   File "/home/www-data/web2py/gluon/dal.py", line 1064, in log_execute
> > >     return self.cursor.execute(*a,**b)
> > > ProgrammingError: syntax error at or near ")"
> > > LINE 1: SELECT  tag.id FROM tag WHERE (tag.id IN ());

Reply via email to