I'm having trouble getting my tagged modles registered in 1.1 When I have "tagging.register(MyModel)" at the bottom, I get this error when I try to add a new instance of that model in the admin: "null value in column "object_id" violates not-null constraint"
full traceback: ################################# Traceback: File "/home/chris/lib/python2.6/django/core/handlers/base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "/home/chris/lib/python2.6/django/contrib/admin/options.py" in wrapper 226. return self.admin_site.admin_view(view)(*args, **kwargs) File "/home/chris/lib/python2.6/django/views/decorators/cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/home/chris/lib/python2.6/django/contrib/admin/sites.py" in inner 186. return view(request, *args, **kwargs) File "/home/chris/lib/python2.6/django/db/transaction.py" in _commit_on_success 240. res = func(*args, **kw) File "/home/chris/lib/python2.6/django/contrib/admin/options.py" in add_view 718. new_object = self.save_form(request, form, change=False) File "/home/chris/lib/python2.6/django/contrib/admin/options.py" in save_form 551. return form.save(commit=False) File "/home/chris/lib/python2.6/django/forms/models.py" in save 407. fail_message, commit, exclude=self._meta.exclude) File "/home/chris/lib/python2.6/django/forms/models.py" in save_instance 62. f.save_form_data(instance, cleaned_data[f.name]) File "/home/chris/lib/python2.6/django/db/models/fields/__init__.py" in save_form_data 310. setattr(instance, self.name, data) File "/home/chris/lib/python2.6/tagging/managers.py" in __set__ 65. Tag.objects.update_tags(instance, value) File "/home/chris/lib/python2.6/tagging/models.py" in update_tags 50. TaggedItem._default_manager.create(tag=tag, object=obj) File "/home/chris/lib/python2.6/django/db/models/manager.py" in create 126. return self.get_query_set().create(**kwargs) File "/home/chris/lib/python2.6/django/db/models/query.py" in create 315. obj.save(force_insert=True) File "/home/chris/lib/python2.6/django/db/models/base.py" in save 410. self.save_base(force_insert=force_insert, force_update=force_update) File "/home/chris/lib/python2.6/django/db/models/base.py" in save_base 495. result = manager._insert(values, return_id=update_pk) File "/home/chris/lib/python2.6/django/db/models/manager.py" in _insert 177. return insert_query(self.model, values, **kwargs) File "/home/chris/lib/python2.6/django/db/models/query.py" in insert_query 1087. return query.execute_sql(return_id) File "/home/chris/lib/python2.6/django/db/models/sql/subqueries.py" in execute_sql 320. cursor = super(InsertQuery, self).execute_sql(None) File "/home/chris/lib/python2.6/django/db/models/sql/query.py" in execute_sql 2369. cursor.execute(sql, params) File "/home/chris/lib/python2.6/django/db/backends/util.py" in execute 19. return self.cursor.execute(sql, params) Exception Type: IntegrityError at /admin/plane/plane/add/ Exception Value: null value in column "object_id" violates not-null constraint ################################### then why I try to edit an existing airplane, I get this error: "can't adapt" Traceback: File "/home/chris/lib/python2.6/django/core/handlers/base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "/home/chris/lib/python2.6/django/contrib/admin/options.py" in wrapper 226. return self.admin_site.admin_view(view)(*args, **kwargs) File "/home/chris/lib/python2.6/django/views/decorators/cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/home/chris/lib/python2.6/django/contrib/admin/sites.py" in inner 186. return view(request, *args, **kwargs) File "/home/chris/lib/python2.6/django/db/transaction.py" in _commit_on_success 240. res = func(*args, **kw) File "/home/chris/lib/python2.6/django/contrib/admin/options.py" in change_view 830. self.save_model(request, new_object, form, change=True) File "/home/chris/lib/python2.6/django/contrib/admin/options.py" in save_model 557. obj.save() File "/home/chris/lib/python2.6/django/db/models/base.py" in save 410. self.save_base(force_insert=force_insert, force_update=force_update) File "/home/chris/lib/python2.6/django/db/models/base.py" in save_base 474. rows = manager.filter(pk=pk_val)._update (values) File "/home/chris/lib/python2.6/django/db/models/query.py" in _update 444. return query.execute_sql(None) File "/home/chris/lib/python2.6/django/db/models/sql/subqueries.py" in execute_sql 120. cursor = super(UpdateQuery, self).execute_sql (result_type) File "/home/chris/lib/python2.6/django/db/models/sql/query.py" in execute_sql 2369. cursor.execute(sql, params) File "/home/chris/lib/python2.6/django/db/backends/util.py" in execute 19. return self.cursor.execute(sql, params) Exception Type: ProgrammingError at /admin/plane/plane/3/ Exception Value: can't adapt ############################################### In both cases, commenting out the register line makes it so both aditing and creating new items work. Using the admin interface and using save() via the interactive shell has the same result. Is this a known bug in django-tagging, or is there something wrong with what I'm doing? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---