diff --git a/django/forms/__init__.py b/django/forms/__init__.py index 544ea7dd4f..537a109527 100644 --- a/django/forms/__init__.py +++ b/django/forms/__init__.py @@ -969,6 +969,13 @@ class CommaSeparatedIntegerField(TextField): except validators.ValidationError, e: raise validators.CriticalValidationError, e.messages + def render(self, data): + if data is None: + data = '' + elif isinstance(data, (list, tuple)): + data = ','.join(data) + return super(CommaSeparatedIntegerField, self).render(data) + class RawIdAdminField(CommaSeparatedIntegerField): def html2python(data): if data: