After upgrading to web2py 2.13.2 (previously on 2.12.3) I got the following 
error:

    Traceback (most recent call last):
  File "/home/franciscocosta/www/web2py/gluon/restricted.py", line 227, in 
restricted
    exec ccode in environment
  File 
"/home/franciscocosta/www/web2py/applications/emprego/views/backoffice/form_ofertas.html",
 line 621, in <module>
  File "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/objects.py", 
line 2022, in select
    return adapter.select(self.query,fields,attributes)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 829, in select
    groupby=groupby, distinct=distinct, having=having)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 356, in __init__
    self.query_dict = adapter.expand(self.query)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 704, in expand
    result = op(first, second, **optional_args)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 1151, in check_fields
    return f(self, first, second, *args, pipeline=pipeline, **kwargs)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 1165, in EQ
    return {self.expand(first): self.expand(second, first.type)}
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 717, in expand
    raise NotImplementedError("How did you reach this line of code???")
NotImplementedError: How did you reach this line of code???

shows up when I have this code:

if db(db.industries.parent == []).select():

and this is the industries table:

db.define_table(
    'industries',
    Field('id', required=True, unique=True),
    Field('name', 'string', label=T('Nome'), length=128, required=True),
    Field('slug', 'string', compute=lambda row: slugify(row.name) if row.name 
else None, length=128, required=True, unique=True, writable=False, 
readable=False),
    Field('parent', 'list:reference industries', label=T('Principal'), 
required=False, default=None, writable=False, readable=True),
    format='%(name)s'
)



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to