jinjie2088 / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

IntegrityError on Tag.objects.get_for_object #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When you set 2 tags like:
a, á

raise this error when you use Tag.objects.get_for_object:

 Traceback (most recent call last):
File "/usr/src/django/Django-svn-uimpi.net/django/core/handlers/base.py" 
in _real_get_response
  81. response = callback(request, *callback_args, **callback_kwargs)
File "/home/lorcas/dev/uimpi/posts/views.py" in add_post
  539. new_entry.save()
File "/home/lorcas/dev/uimpi/posts/models.py" in save
  126. self.tags = self.tag_list.lower()
File "/home/lorcas/dev/uimpi/posts/models.py" in _set_tags
  132. Tag.objects.update_tags(self, tag_list)
File "/usr/src/django/Django-svn-uimpi.net/django/db/models/manager.py" in 
create
  75. return self.get_query_set().create(**kwargs)
File "/usr/src/django/Django-svn-uimpi.net/django/db/models/query.py" in 
create
  273. obj.save()
File "/usr/src/django/Django-svn-uimpi.net/django/db/models/base.py" in 
save
  259. ','.join(placeholders)), db_values)
File "/usr/src/django/Django-svn-uimpi.net/django/db/backends/util.py" in 
execute
  19. return self.cursor.execute(sql, params)
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py" in execute
  166. self.errorhandler(self, exc, value)
File "/var/lib/python-support/python2.5/MySQLdb/connections.py" in 
defaulterrorhandler
  35. raise errorclass, errorvalue

  IntegrityError at /add_post/
  (1062, "Duplicate entry '1071-18-1636' for key 2")

Original issue reported on code.google.com by pylo...@gmail.com on 6 Feb 2008 at 4:05

GoogleCodeExporter commented 9 years ago
yes, i also get this exception

temporarily solved by removing unique property of name field in tag tables

Original comment by dugan...@gmail.com on 21 Apr 2008 at 1:21

GoogleCodeExporter commented 9 years ago
Yes it is surely a bug issue. Especially when you handle the international tags 
which
"slugify" into same slugs or names. Russian "тест" equals to "test", for 
examle.

Original comment by tezro...@gmail.com on 25 Sep 2009 at 11:19