I have a small code with this: db.define_table('book', Field('name',requires = IS_NOT_EMPTY()), Field('category', requires = IS_IN_SET(['Politics','Finance','Fiction','Wellness']), default = 'Politics'), Field('price', 'integer',requires = IS_NOT_EMPTY()), Field('image','upload'), Field('selling_type',requires = IS_IN_SET(['Bids','Buy']),default = 'Bid'), Field('book_author', db.auth_user, default=auth.user_id, writable=False, readable=False, requires=IS_IN_DB(db, db.auth_user.id,'%(first_name)s')), Field('description','text',requires = IS_NOT_EMPTY()), Field('created_on','datetime', default=request.now, update=request.now, writable=False))
product = db(book_author.id==db.book.book_author).select(db.book.ALL) But I get this Error: product = db(book_author.id==db.book.book_author).select(db.book.ALL) AttributeError: 'NoneType' object has no attribute 'id' -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/be78b36e-5c92-4ac8-8290-1729fb00810dn%40googlegroups.com.