mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Refs #28909 -- Simplifed code using unpacking generalizations.
This commit is contained in:
parent
5b589a47b9
commit
074a2f7f58
8 changed files with 19 additions and 34 deletions
|
@ -219,9 +219,7 @@ class QuerySet:
|
|||
def __getstate__(self):
|
||||
# Force the cache to be fully populated.
|
||||
self._fetch_all()
|
||||
obj_dict = self.__dict__.copy()
|
||||
obj_dict[DJANGO_VERSION_PICKLE_KEY] = get_version()
|
||||
return obj_dict
|
||||
return {**self.__dict__, DJANGO_VERSION_PICKLE_KEY: get_version()}
|
||||
|
||||
def __setstate__(self, state):
|
||||
msg = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue