Is this in appadmin or your own forms?

On Jan 10, 5:44 pm, howesc <how...@umich.edu> wrote:
> It seems that in the latest version of web2py (1.91.6 and today's trunk)
> that if you have a table (say auth_user), with a format string, and then you
> refer to it in another table as read-only like:
>   Field('updated_by', 'reference '+auth.settings.table_user_name,
>         default=auth.user_id,update=auth.user_id,writable=False),
>
> when the form is rendered we see 'None' rather than the format of the
> referenced table.  I can adjust the read-only field to have a represent
> like:
>   Field('created_by', 'reference '+auth.settings.table_user_name,
>         default=auth.user_id, writable=False,
>         represent=lambda x: auth_user_table[x].first_name + " " + \
>           auth_user_table[x].last_name+" ("+str(auth_user_table[x].id)+")" \
>           if x else None),
> (which matches my format string on my auth_user table).  Is this a
> regression, or was i making broken assumptions previously?
>
> thanks,
>
> christian

Reply via email to