mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +00:00
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:
parent
c055224763
commit
35355a4ffe
4 changed files with 128 additions and 24 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue