Ticket #7668: newform.patch

File newform.patch, 533 bytes (added by Jamey Hicks <jamey.hicks@…>, 16 years ago)

patch

  • django/newforms/models.py

     
    361361        if value in EMPTY_VALUES:
    362362            return None
    363363        try:
    364             value = self.queryset.get(pk=value)
     364            value = self.queryset.get(pk=value.pk)
    365365        except self.queryset.model.DoesNotExist:
    366366            raise ValidationError(self.error_messages['invalid_choice'])
    367367        return value
Back to Top