#14071: Row duplicated when modifying PK
----------------------------------+-----------------------------------------
Reporter: mnbayazit | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: 1.2
Keywords: | Stage: Unreviewed
Has_patch: 0 |
----------------------------------+-----------------------------------------
Create a model and add a field with primary_key=True
Go into the django admin panel and change this primary key.
A new entry is added with the new PK, but the old one remains as well.
Sample model:
class FlatPage(Model):
title = CharField(max_length=50)
key = SlugField(max_length=50, primary_key=True, help_text="Do
not change.")
content = TextField()
created = DateTimeField(auto_now_add=True)
updated = DateTimeField(auto_now=True)
def __unicode__(self):
return self.title
class Meta:
app_label = 'app'
--
Ticket URL: <http://code.djangoproject.com/ticket/14071>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.