Opened 16 years ago

Last modified 13 years ago

#8102 closed

get_or_create is unable to handle unicode characters — at Initial Version

Reported by: Dave Naffziger Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Models.py:

class Article(models.Model):

headline = models.CharField(max_length=100)

Shell session:

from mysite.models import Article
string = u'\xae'
a = Article.objects.get_or_create(headline = string)
a

(<Article: Article object>, True)

a = Article.objects.get_or_create(headline = string)
a

(<Article: Article object>, True)

This seems to be recently introduced (I'm on 8125) and only noticed the bug after a recent update.

This is a pretty major bug and I ran out of time tonight to dig into it, but I wanted to at raise the issue now so that others can look at it.

This is going to create serious backwards incompatibility issues in people's databases if they are running with this bug.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top