File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ def use_query(
112
112
113
113
Args:
114
114
query: A callable that returns a Django `Model` or `QuerySet`.
115
+ options: A `QueryOptions` object that can modify how the query is excuted.
115
116
*args: Positional arguments to pass into `query`.
116
117
117
118
Keyword Args:
@@ -158,7 +159,7 @@ def execute_query() -> None:
158
159
159
160
# Use a custom postprocessor, if provided
160
161
if query_options .postprocessor :
161
- query_options .postprocessor (query_options )
162
+ query_options .postprocessor (data , query_options )
162
163
163
164
# Use the default postprocessor
164
165
else :
Original file line number Diff line number Diff line change @@ -62,6 +62,6 @@ class QueryOptions:
62
62
)
63
63
"""Configuration values usable by the `postprocessor`."""
64
64
65
- postprocessor : Callable [[QueryOptions ], None ] | None = None
65
+ postprocessor : Callable [[_Data , QueryOptions ], None ] | None = None
66
66
"""A post processing callable that can read/modify the `QueryOptions` object. If unset, the default fetch
67
67
handler is used to prevent lazy loading of Django fields."""
You can’t perform that action at this time.
0 commit comments