Fixed #25389 -- Fixed pickling a SimpleLazyObject wrapping a model.

Pickling a `SimpleLazyObject` wrapping a model did not work correctly; in
particular it did not add the `_django_version` attribute added in 42736ac8.
Now it will handle this and other custom `__reduce__` methods correctly.
This commit is contained in:
Ben Kraft 2015-09-11 23:06:25 -07:00 committed by Tim Graham
parent c055224763
commit 35355a4ffe
4 changed files with 128 additions and 24 deletions

View file

@ -11,3 +11,7 @@ class Category(models.Model):
class Thing(models.Model):
name = models.CharField(max_length=100)
category = models.ForeignKey(Category, models.CASCADE)
class CategoryInfo(models.Model):
category = models.OneToOneField(Category, models.CASCADE)