File tree Expand file tree Collapse file tree 3 files changed +63
-107
lines changed
Expand file tree Collapse file tree 3 files changed +63
-107
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " drf-caching"
3- version = " 1.5 .0"
3+ version = " 1.6 .0"
44description = " Handle views caching in Django Rest Framework."
55readme = " README.md"
66authors = [
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def _get_data(
129129 for field in obj ._meta .get_fields (): # noqa: SLF001
130130 _attr = getattr (obj , field .name )
131131 data [field .name ] = (
132- _attr .all ().values_list () if isinstance (_attr , Manager ) else _attr
132+ list ( _attr .all ().values_list () ) if isinstance (_attr , Manager ) else _attr
133133 )
134134
135135 return data
@@ -148,7 +148,7 @@ def _get_data(
148148 ) -> dict [str , Any ]:
149149 return {
150150 "querylist" : [
151- querylist ["queryset" ].values_list ()
151+ list ( querylist ["queryset" ].values_list () )
152152 for querylist in view_instance .filter_queryset (
153153 view_instance .get_querylist ()
154154 )
@@ -168,9 +168,11 @@ def _get_data(
168168 ** kwargs : Any ,
169169 ) -> dict [str , Any ]:
170170 return {
171- "queryset" : view_instance .filter_queryset (
172- view_instance .get_queryset ()
173- ).values_list ()
171+ "queryset" : list (
172+ view_instance .filter_queryset (
173+ view_instance .get_queryset ()
174+ ).values_list ()
175+ )
174176 }
175177
176178
You can’t perform that action at this time.
0 commit comments