google-code-export / student-worker-relational-database

Automatically exported from code.google.com/p/student-worker-relational-database
1 stars 1 forks source link

Table 'sword_lourdesacademyhs.benchmark_grade_mark' doesn't exist on delete student #258

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Probably saved a student that was supposed to be marked inactive from getting 
deleted. But still a bug.

Internal Server Error: /admin/sis/student/133/delete/

Traceback (most recent call last):

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/core/handlers/base.py", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/contrib/admin/options.py", line 307, in wrapper
   return self.admin_site.admin_view(view)(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/decorators.py", line 93, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/views/decorators/cache.py", line 79, in _wrapped_view_func
   response = view_func(request, *args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/contrib/admin/sites.py", line 197, in inner
   return view(request, *args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/transaction.py", line 217, in inner
   res = func(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/django_reversion-1.5.1-py2.6.egg/reversion/revisions.py", line 279, in do_revision_context
   return func(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/django_reversion-1.5.1-py2.6.egg/reversion/admin.py", line 368, in delete_view
   return super(VersionAdmin, self).delete_view(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/decorators.py", line 28, in _wrapper
   return bound_func(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/decorators.py", line 93, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/decorators.py", line 24, in bound_func
   return func(self, *args2, **kwargs2)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/transaction.py", line 217, in inner
   res = func(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/contrib/admin/options.py", line 1201, in delete_view
   [obj], opts, request.user, self.admin_site, using)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/contrib/admin/util.py", line 76, in get_deleted_objects
   collector.collect(objs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/contrib/admin/util.py", line 127, in collect
   return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/deletion.py", line 168, in collect
   if not sub_objs:

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/query.py", line 113, in __nonzero__
   iter(self).next()

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/query.py", line 107, in _result_iter
   self._fill_cache()

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/query.py", line 772, in _fill_cache
   self._result_cache.append(self._iter.next())

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/query.py", line 273, in iterator
   for row in compiler.results_iter():

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/sql/compiler.py", line 680, in results_iter
   for rows in self.execute_sql(MULTI):

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/models/sql/compiler.py", line 735, in execute_sql
   cursor.execute(sql, params)

 File "/usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/db/backends/mysql/base.py", line 86, in execute
   return self.cursor.execute(query, args)

 File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute
   self.errorhandler(self, exc, value)

 File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler
   raise errorclass, errorvalue

DatabaseError: (1146, "Table 'sword_lourdesacademyhs.benchmark_grade_mark' 
doesn't exist")

Original issue reported on code.google.com by dmbs...@gmail.com on 14 Dec 2011 at 3:13

GoogleCodeExporter commented 9 years ago
Fix was reverted for some reason; this probably saved us from the nuclear 
disaster. I guess three wrongs make a right.

c3516bde (calli       2011-12-07 17:06:33 -0500   9) from 
ecwsp.benchmark_grade.models import *

Original comment by jmil...@cristoreyny.org on 14 Dec 2011 at 6:38