diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py index 613e63e449..7a60943d46 100644 --- a/django/contrib/admin/helpers.py +++ b/django/contrib/admin/helpers.py @@ -23,7 +23,10 @@ class AdminForm(object): if self.form._meta.fields is not None: name = self.form._meta.fields[0] return forms.BoundField(self.form, self.form.fields[name], name) - return iter(self.form).next() + try: + return iter(self.form).next() + except StopIteration: + return None def _media(self): media = self.form.media