Removed unnecessary type creation in modelforset_factory.

This commit is contained in:
Simon Charette 2016-03-25 12:50:35 -04:00
parent eaecada793
commit 5974cbe32e
1 changed files with 0 additions and 2 deletions

View File

@ -842,8 +842,6 @@ def modelformset_factory(model, form=ModelForm, formfield_callback=None,
Returns a FormSet class for the given Django model class.
"""
meta = getattr(form, 'Meta', None)
if meta is None:
meta = type(str('Meta'), (object,), {})
if (getattr(meta, 'fields', fields) is None and
getattr(meta, 'exclude', exclude) is None):
raise ImproperlyConfigured(