I just moved an app into production using a postgresql database and am
having some trouble with Auth. All of the development was done
against sqlite and everything is working fine in there. In fact,
everything works fine against postgresql too except for registering
new users. For some reason when I run the app against a postgresql
database, I get the following error while trying to register a new
user:
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".
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. My code is very simple:
def register():
return dict(form = auth.register(next='login'))
Any help anyone can provide would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---