I submitted a pull request with a fix if you want you can apply the changes locally to fix your problem:https://github.com/web2py/pydal/pull/489