Does it work if you put the call to IS_NOT_IN_DB in line with the field
definition rather than assigning it to a variable?
On Tuesday, October 23, 2012 2:27:32 AM UTC-4, Annet wrote:
>
> Hi Villas,
>
> Thanks for your reply. I tried:
>
> is_not_in_db=IS_NOT_IN_DB(db,'hub.name',error_message='name already in
> database')
>
> db.define_table('hub',
> Field(...),
>
> Field('name',default='',requires=[IS_NOT_EMPTY(),is_not_in_db],notnull=True,unique=True),
> Field(...),
> migrate=False)
>
> But I still cannot update hub. I put the validators inside the field
> definition because I want to make use of lazy_tables=True
>
>
> Kind regards,
>
> Annet
>
--