I've got a table to which I'm adding a virtual field:

    db.host.not_removed = Field.Virtual(lambda row:
        db(db.url_queue.removed == None).count())

I'm then using it in a grid:

        list=SQLFORM.grid(
            db.host.id > 0,
            orderby=db.host.domain,
            fields=[db.host.domain, db.host.categ, db.host.not_removed],
            headers=headers,
            deletable=False,
            editable=False,
            details=False,
            create=False,
            ui='web2py',
            )

I'm getting a ticket:

  File "N:\web2py\gluon\sqlhtml.py", line 1505, in grid
    if field._tablename in tablenames]
AttributeError: 'FieldVirtual' object has no attribute '_tablename'

-- 



Reply via email to