I have this action that verify is a group exist, if not, it create this 
group:

verify_install = db(db.auth_group.role == 'admin').select()
if not verify_install:
 auth.add_group('admin', 'Administrative Group')
 redirect 
<https://ec2-23-22-64-190.compute-1.amazonaws.com/examples/global/vars/redirect>(URL
 
<https://ec2-23-22-64-190.compute-1.amazonaws.com/examples/global/vars/URL>('install',
 'index'))


 works well in sqlite, but in mysql I am getting this error:

IntegrityError: (1452, u'Cannot add or update a child row: a foreign key 
constraint fails (`chipincode`.`auth_event`, CONSTRAINT `auth_event_ibfk_1` 
FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) ON DELETE CASCADE)')


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to