> You could perhaps try default=auth.user_id instead. I'm not totally sure if
> that behaves differently.
> I don't usually use is_in_db() so can't say for sure how that might be
> affecting it.
> Can you provide more of the error details?
I think I *might* have fixed it about the same time as you answered!
I changed the model:
Field('dataowner', db.auth_user, default=auth.user.id if auth.user
else None, writable=False, readable=False),
In my minuscule understanding of this, I think it then allows the
model to accept 'None' as valid (although in reality 'None' should
never be recorded in the database because the decorator on the data
entry function requires the user to be logged in).
Seems to work for me as far as I've tested. What do you think?
Chris