do creepy metaclass stuff in wrappers.py
This commit is contained in:
parent
da9a7c5130
commit
e3c8947883
3 changed files with 35 additions and 16 deletions
|
@ -120,7 +120,7 @@ class ChangeSet(models.Model):
|
|||
if isinstance(obj, type) and issubclass(obj, models.Model):
|
||||
return ModelWrapper(self, obj, author)
|
||||
if isinstance(obj, models.Model):
|
||||
return ModelInstanceWrapper(self, obj, author)
|
||||
return ModelWrapper(self, type(obj), author).create_wrapped_model_class()(self, obj, author)
|
||||
raise ValueError
|
||||
|
||||
def _new_change(self, author, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue