It seems that change 
14bcad629eb2b73266b11b4c9dbf63499c73d38b<https://github.com/web2py/web2py/commit/14bcad629eb2b73266b11b4c9dbf63499c73d38b>
 modified 
the way SQLTABLE handled column names by using this regex for table.field:

REGEX_TABLE_DOT_FIELD = re.compile('^(\w+)\.([^.]+)$')


This has caused a backwards compatibility problem when doing the following:

In [1]: count = db.auth_user.id.count()

In [2]: a = db().select(db.auth_user.first_name, count, 
groupby=db.auth_user.first_name)

In [3]: SQLTABLE(a)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/oldgrutz/Documents/SPA/Kvasir/grutz-kvasir-virtenv/web2py/applications/kvgrutz/models/scheduler.py
 
in <module>()
----> 1 SQLTABLE(a)

/Users/oldgrutz/Documents/SPA/Kvasir/grutz-kvasir-virtenv/web2py/gluon/sqlhtml.py
 
in __init__(self, sqlrows, linkto, upload, orderby, headers, truncate, 
columns, th_link, extracolumns, selectid, renderstyle, cid, colgroup, 
**attributes)
   2912             return
   2913         if not columns:
-> 2914             columns = 
['.'.join(sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD.match(c).groups()) for 
c in sqlrows.colnames]
   2915         if headers == 'fieldname:capitalize':
   2916             headers = {}

AttributeError: 'NoneType' object has no attribute 'groups'

In [4]:


 

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to