Yea, It is still throwing the same error. IntegrityError: insert or update on table "auth_event" violates foreign key constraint "auth_event_user_id_fkey" DETAIL: Key (user_id)=(0) is not present in table "auth_user".
It throws it against line 16 in the register function of default.py which looks like this: def register(): return dict(form = auth.register(next='login')) Again, it works fine in sqlite, just not in postgresql. -jason On Feb 16, 9:16 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > I just posted 1.56.3 on the web site. It should be fixed. Please give > it one more try. > > Massimo > > On Feb 16, 10:19 am, jlegler <jleg...@gmail.com> wrote: > > > Did you put this in the SVN trunk? If so it is still happening. > > > -jason > > > On Feb 15, 6:44 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > Check if this is now fixed in trunk.. in 5 minutes > > > > On Feb 14, 11:25 am, jlegler <jleg...@gmail.com> wrote: > > > > > Okay, thanks. I will see if I can find any side effects from doing > > > > that. I'll also see if I can figure out why it behaves in sqlite and > > > > if it behaves in mysql. Perhaps this is a good reason to not use > > > > postgresql. > > > > > -Jason > > > > > On Feb 14, 1:21 am, Fran <francisb...@googlemail.com> wrote: > > > > > > On Feb 14, 12:28 am, jlegler <jleg...@gmail.com> wrote: > > > > > > > The database seems to be complaining about a foreign key violation > > > > > > while trying to add the user because there is no user with an ID of > > > > > > 0. It is behaving like it tries to update auth_event with the id > > > > > > of a > > > > > > user when no user is logged in (because the user is still being > > > > > > created). Does anyone have any suggestions on what I may have done > > > > > > wrong or if this is in fact a bug? I manually added the user in the > > > > > > db and it works fine. Something is odd about the way it behaves > > > > > > when > > > > > > it updates auth_event. > > > > > > Right - unauthenticated users log in auth_event as user_id 0 as you > > > > > have correctly worked out. > > > > > This is due to tools.py +484: > > > > > db.Field('user_id', self.settings.table_user, > > > > > default=0) > > > > > > I guess this is indeed a bug, although I know too little about the DAL > > > > > to know whether we could fix it in the DAL or whether we need to fix > > > > > the Auth class. > > > > > > > Any help anyone can provide would be appreciated. > > > > > > I would try working around this by editing tools.py +309 from: > > > > > self.settings.register_log = 'User %(id)s Registered' > > > > > to: > > > > > self.settings.register_log = 'User Registered' > > > > > > F --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---