1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.8.x] 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.

Backport of 35355a4ffe from master
This commit is contained in:
Ben Kraft
2015-09-11 23:06:25 -07:00
committed by Tim Graham
parent 29c9a7d220
commit c03f0c282d
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)
class CategoryInfo(models.Model):
category = models.OneToOneField(Category)