My models reference session.auth.user as follows:
Field('request_tenant', default=session.auth.user.request_tenant)
Obviously this will fail if the user is not logged in because
session.auth.user is None.
In 1.99.2, using any of the @auth decorators forces a login before the
model files run, so there is no problem.
In 2.1.1, errors occur. It seems like the models are being run before the
decorators have been evaluated, whereas in 1.99.2 the decorators were
evaluated first.
Has something changed in Web2py?
The applicable model files are identical, according to diff. The
controllers are not, but I made no changes to the index functions and I get
the error when running index.
Any idea what's going on?
--