diff options
| author | Ben Kraft <benjaminjkraft@gmail.com> | 2015-09-11 23:06:25 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-10-03 13:00:37 -0400 |
| commit | 35355a4ffedb2aeed52d5fe3034380ffc6a438db (patch) | |
| tree | fe5e0987ef7e5cedca3a8aa36496b544f8bf868b /tests/utils_tests/models.py | |
| parent | c055224763e11b29cce0a7c10751354c40dac63e (diff) | |
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.
Diffstat (limited to 'tests/utils_tests/models.py')
| -rw-r--r-- | tests/utils_tests/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/utils_tests/models.py b/tests/utils_tests/models.py index 700fcfcaf4..97e9a97ef8 100644 --- a/tests/utils_tests/models.py +++ b/tests/utils_tests/models.py @@ -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) |
