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 in42736ac8. Now it will handle this and other custom `__reduce__` methods correctly. Backport of35355a4ffefrom master
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user