#9218: KeyError in validate_unique when primary_key is in fields and it's empty in form -----------------------------------------------------------+---------------- Reporter: romke <[EMAIL PROTECTED]> | Owner: nobody Status: new | Milestone: Component: Forms | Version: SVN Keywords: KeyError, validate_unique, custom primary_key | Stage: Unreviewed Has_patch: 0 | -----------------------------------------------------------+---------------- 1. create model with custom primary_key:
{{{ class Test(models.Model): testing = models.CharField(max_length=20, primary_key=True) }}} 2. create form: {{{ class TestForm(forms.ModelForm): class Meta: model = Test fields = ('testing') }}} 3. POST EMPTY testing field {{{ KeyError @ forms/models.py in validate_unique, line 235 will pop up }}} -- Ticket URL: <http://code.djangoproject.com/ticket/9218> 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 django-updates@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---