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 <[email protected]> wrote: > On Feb 14, 12:28 am, jlegler <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

