﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3411	[Django Multi DB Tree]: modifying objects via the admin interface generates an operational error	jamie@…	nobody	"Using the Django Multi Database tree, any attempt to modify an object via the admin interface generates the Operational Error (1048, ""Column 'action_time' cannot be null"") when it attempts to create the django_admin_log log entry.

/usr/lib/python2.4/site-packages/django_mdb_src/django/contrib/admin/views/main.py
{{{
LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, str(new_object), ADDITION)
}}}
 

/usr/lib/python2.4/site-packages/django_mdb_src/django/db/backends/util.py in execute

{{{
   5. def __init__(self, cursor, db):
   6. self.cursor = cursor
   7. self.db = db
   8.
   9. def execute(self, sql, params=()):
  10. start = time()
  11. try:

  12. return self.cursor.execute(sql, params) ...

  13. finally:
  14. stop = time()
  15. # If params was a list, convert it to a tuple, because string
  16. # formatting with '%' only works with tuples or dicts.
  17. if not isinstance(params, (tuple, dict)):
  18. params = tuple(params)
}}}



{{{
Local vars
Variable 	Value
params 	
(None, 1L, 10L, 3L, 'niner niner', 1, '')
self 	
<django.db.backends.util.CursorDebugWrapper object at 0xa943ee8c>
sql 	
'INSERT INTO `django_admin_log` (`action_time`,`user_id`,`content_type_id`,`object_id`,`object_repr`,`action_flag`,`change_message`) VALUES (%s,%s,%s,%s,%s,%s,%s)'

}}}

If I manually attempt to INSERT this SQL with the params fields for values I get the same error.  I've diff'ed all the files in the error chain against headrev and django_mdb tree and don't see any glaring obvious differences that would affect this but clearly I'm missing something.  I should also note that only changing my site-packages 'django' symlink from django_src ( headrev ) to django_mdb_src ( mdb tree ) the problem goes away."		closed	contrib.admin	other branch		wontfix	admin LogEntry multiple-db-support		Someday/Maybe	0	0	0	0	0	0
