[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
Ok, i renamed the field logo in logo2 and all works fine... Rechecking the code I saw that I had defined in a previous version the field "logo" as "reference". it is probably not deleted the foreign key in sqlite when I change the definition of the field from "reference" to "upload" thx I

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Anthony
I cannot reproduce the problem. Can you pack and attach an app the exhibits the problem? On Thursday, January 16, 2014 3:23:24 AM UTC-5, Ivan Gazzola wrote: > > > The value for dentista is correct, is equal to Nominativi.id selected in > drop-down list. > When I insert or update the record with

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
I found the code in sqlhtml.py, the empty upload value is '' or default elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname if f == '' or f is None: if self.vars.get(fd, False):

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
The value for dentista is correct, is equal to Nominativi.id selected in drop-down list. When I insert or update the record with 'logo' empty the query is generated with '' instead of NULL and sqlite cannot parse the full query. if I update with db.Consulenze.insert(dentista=1240) it woks. Il

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-15 Thread Anthony
What value of dentista is being inserted, and have you confirmed that that value is the id of one of the records in the Nominativi table? On Wednesday, January 15, 2014 5:56:18 PM UTC-5, Ivan Gazzola wrote: > > I've this table: > db.define_table("Consulenze", > Field('dentista','reference Nom