Hello! I'm trying to use the current user with DAL.
db.define_table('tickets', Field('title', required=IS_NOT_EMPTY, label='ticket_title'), Field('description', 'text', required=IS_NOT_EMPTY, label='ticket_description'), Field('created_by', 'reference auth_user'), Field('created_on', 'datetime', default=request.now), format = '%(title)s', ) Get the error: return ogetattr(self, str(key)) AttributeError: 'Table' object has no attribute '('username', '')' (self=<Table auth_user (id,first_name,last_name,email,...,reset_password_key,registration_id,guid,phones)>, key=('username', '')) query = self._build_query(key) return self._db(query).select(limitby=(0,1), orderby_on_limitby=False).first() elif str(key).isdigit() or 'google' in DRIVERS and isinstance(key, Key): return self._db(self._id == key).select(limitby=(0,1), orderby_on_limitby=False).first() elif key: return ogetattr(self, str(key)) Function argument list (self=<Table auth_user (id,first_name,last_name,email,...,reset_password_key,registration_id,guid,phones)>, key=('username', '')) def __call__(self, key=DEFAULT, **kwargs): for_update = kwargs.get('_for_update',False) if '_for_update' in kwargs: del kwargs['_for_update'] What am I doing wrong? -- 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.