I'm still having trouble editing records in appadmin due to a foreign key 
constraint. Even though I'm logged in as auth_user.id=5, it's trying to set 
modified_by=0. This was in trying to update a custom auth_user table which 
has an auth.signature.


Traceback (most recent call last):
  File "/opt/web2py/gluon/restricted.py", line 192, in restricted
    exec ccode in environment
  File "/opt/web2py/applications/init/controllers/appadmin.py", line 410, in 
<module>
  File "/opt/web2py/gluon/globals.py", line 137, in <lambda>
    self._caller = lambda f: f()
  File "/opt/web2py/applications/init/controllers/appadmin.py", line 277, in 
update
    if form.accepts(request.vars, session):
  File "/opt/web2py/gluon/sqlhtml.py", line 1203, in accepts
    self.table._db(self.table._id == self.record.id).update(**fields)
  File "/opt/web2py/gluon/dal.py", line 5407, in update
    return self.db._adapter.update(tablename,self.query,fields)
  File "/opt/web2py/gluon/dal.py", line 1002, in update
    self.execute(sql)
  File "/opt/web2py/gluon/dal.py", line 1251, in execute
    return self.log_execute(*a, **b)
  File "/opt/web2py/gluon/dal.py", line 1246, in log_execute
    ret = self.cursor.execute(*a,**b)
IntegrityError: insert or update on table "auth_user" violates foreign key 
constraint "auth_user_modified_by_fkey"
DETAIL:  Key (modified_by)=(0) is not present in table "auth_user".

Reply via email to