Issue #5 new

Plugin model AttributeError accessing id field

Alan Etkin
created an issue

The followint controller:

def showtable():
    return dict(load=LOAD(f="atable.load", ajax=True, times="infinity", timeout=30000))

def atable():
    return dict(table=table)

Raises this exception in PowerTable plugin:

Traceback (most recent call last):
  File "/home/spametki/web2py/web2py-hg/gluon/", line 212, in restricted
    exec ccode in environment
  File "/home/spametki/web2py/web2py-hg/applications/pt/controllers/", line 86, in <module>
  File "/home/spametki/web2py/web2py-hg/gluon/", line 193, in <lambda>
    self._caller = lambda f: f()
  File "/home/spametki/web2py/web2py-hg/applications/pt/controllers/", line 83, in atable
  File "/home/spametki/web2py/web2py-hg/applications/pt/models/", line 817, in plugin_powertable
  File "/home/spametki/web2py/web2py-hg/applications/pt/models/", line 215, in __init__
    _id = record[keycolumntbl][keycolumnfld]
  File "/home/spametki/web2py/web2py-hg/gluon/", line 6451, in __getitem__
    return ogetattr(self, key)
AttributeError: 'Row' object has no attribute 'auth_user'

I managed to fix it with this change at line 213 of the plugin model file Attached is a diff with the fix

Comments (1)

  1. Log in to comment