As I continue to develop my old application from last summer I get
more and more problems that I think is related to the upgrading I did.
Now that i try to add a record to att table I get:


Traceback (most recent call last):
  File "gluon/restricted.py", line 173, in restricted
    exec ccode in environment
  File "/data/domains/exp-kal.nudata.fi/applications/init/controllers/
campaign.py", line 57, in <module>
  File "gluon/globals.py", line 96, in <lambda>
    self._caller = lambda f: f()
  File "gluon/tools.py", line 1864, in f
    return action(*a, **b)
  File "/data/domains/exp-kal.nudata.fi/applications/init/controllers/
campaign.py", line 47, in edit
    if form.accepts(request.vars, session):
  File "gluon/sqlhtml.py", line 975, in accepts
    self.vars.id = self.table.insert(**fields)
  File "gluon/sql.py", line 1891, in insert
    self._db._execute(query)
  File "gluon/sql.py", line 928, in <lambda>
    self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 173, in
execute
    self.errorhandler(self, exc, value)
  File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36,
in defaulterrorhandler
    raise errorclass, errorvalue
IntegrityError: (1452, 'Cannot add or update a child row: a foreign
key constraint fails (`copy_kalenterit/campaign`, CONSTRAINT
`campaign_ibfk_3` FOREIGN KEY (`district`) REFERENCES `

To make sure the problem is with the upgrade I took the old
application and upgraded web2py. I get the same foreign key contraint
fails error.

Could the this error maybe related to this error:
http://groups.google.com/group/web2py/browse_thread/thread/b513b6cc917a026f
Both are database related. Old version is 1.65.4 which is working and
new is 1.76.5.

Any idea where to start looking for the problem or has something
changed in web2py which should be changed in my application too.


Kenneth

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.

Reply via email to