I'm not sure you're supposed to use required=True with a computed field. I think required=True requires an actual value be provided with the insert. With a computed field, it's probably not needed because if no value is provided, the value will be computed, so the field won't end up empty either way.
Anthony On Friday, December 9, 2011 12:40:14 AM UTC-5, Joseph Jude wrote: > > Hi all, > I am just starting to use compute field. Here is my db definition looks > like (it is in a module) > class Entries(object): > ..... > > def define_tables(self,db): > .... > Field('permalink',type='text',required=True,compute = lambda row: > self.get_permalink(row)), > ..... > > def get_permalink(self,row): > > permalink = '/test/' > return permalink > > This throws the error: > > SyntaxError: Table: missing required field: permalink > > What am I doing wrong here? > > > Thank you, > > Joseph > >