mirror of
https://github.com/django/django.git
synced 2024-11-29 22:56:46 +01:00
Removed unnecessary type creation in modelforset_factory.
This commit is contained in:
parent
eaecada793
commit
5974cbe32e
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user