Your error says: ValueError: invalid literal for int() with base 10: ''
so there is a '' in the default somehow. On Nov 18, 6:00 pm, Wes James <compte...@gmail.com> wrote: > so is the db.auth_user the problem or the default=user_id > > I took the default=user_id from the db.py in the book: > > if auth.is_logged_in(): > user_id = auth.user.id > else: > user_id = None > > book page 72 > > On Wed, Nov 18, 2009 at 4:47 PM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > The default for a reference field must be None or an int or a string > > containing and int. It cannot be an empty string. It is ambiguous. It > > is not clear if it should be a None or a 0. > > > On Nov 18, 4:48 pm, Wes James <compte...@gmail.com> wrote: > >> What does this mean: > > >> form=crud.create(db.student,next=URL(r=request)) > >> File "/opt/cnrsa/gluon/tools.py", line 2101, in create > >> deletable=False, > >> File "/opt/cnrsa/gluon/tools.py", line 2048, in update > >> keepvalues=self.settings.keepvalues): > >> File "/opt/cnrsa/gluon/sqlhtml.py", line 865, in accepts > >> fields[fieldname] = int(fields[fieldname]) > >> ValueError: invalid literal for int() with base 10: '' > > >> I get it with this: > > >> SQLField("sid",db.auth_user, default=user_id), > > >> but not with this: > > >> SQLField("sid",default=user_id), > > >> -wes > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---