Hi!
I wonder if somebody could help me!
I have a little trouble with the last dev version:
Traceback (most recent call last):
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/restricted.py", line 212, in restricted
exec ccode in environment
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/applications/web2print/models/db.py", line 1556, in <module>
cache=(cache.disk, 600)).first()
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py", line 9963, in select
return adapter.select(self.query,fields,attributes)
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py", line 1724, in select
sql = self._select(query, fields, attributes)
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py", line 1633, in _select
query = self.common_filter(query,tablenames_for_common_filters)
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py", line 2162, in common_filter
query = query & table._common_filter(query)
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py", line 8354, in <lambda>
if tn==
t.name or getattr(db[tn],'_ot',None)==
t.name])
File "/home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py", line 8427, in __getitem__
return ogetattr(self, str(key))
AttributeError: 'Table' object has no attribute 'name'
I have no name field in the db table but after the
https://github.com/web2py/web2py/commit/60d0812f774bfc94ef20542bc0b1fbe0bcae66e2(fixed issue 1596:Alias don't work with record versioning)
commit 7 days ago, it is checked for
t.name:
if is_active and is_active in fieldnames:
self._before_delete.append(
lambda qset: qset.update(is_active=False))
- newquery = lambda query, t=self: t.is_active == True
+ newquery = lambda query, t=self: \
+ reduce(AND,[db[tn].is_active == True
+ for tn in db._adapter.tables(query)
+ if tn==
t.name or getattr(db[tn],'_ot',None)==
t.name])
query = self._common_filter
if query:
newquery = query & newquery
self._common_filter = newquery
I do not understand fully the logic so I can't provide a patch but could be simple. Please somebody take a look.
Thanks.
Issue:
http://code.google.com/p/web2py/issues/detail?id=1609