@@ -152,8 +152,8 @@ def prep_value(k, v):
152
152
return f'{ k } ="{ v } "'
153
153
return f"{ k } ={ v } "
154
154
155
- def combine_conditions (negate , restrictions ):
156
- return f"{ 'NOT ' if negate else '' } ({ ')AND(' .join (restrictions )} )"
155
+ def combine_conditions (negate , conditions ):
156
+ return f"{ 'NOT ' if negate else '' } ({ ')AND(' .join (conditions )} )"
157
157
158
158
negate = False
159
159
while isinstance (condition , Not ):
@@ -164,7 +164,7 @@ def combine_conditions(negate, restrictions):
164
164
if isinstance (condition , str ):
165
165
columns .update (extract_column_names (condition ))
166
166
return combine_conditions (
167
- negate , restrictions = [condition .strip ().replace ("%" , "%%" )]
167
+ negate , conditions = [condition .strip ().replace ("%" , "%%" )]
168
168
) # escape %, see issue #376
169
169
170
170
# restrict by AndList
@@ -181,7 +181,7 @@ def combine_conditions(negate, restrictions):
181
181
return negate # if any item is False, the whole thing is False
182
182
if not items :
183
183
return not negate # and empty AndList is True
184
- return combine_conditions (negate , restrictions = items )
184
+ return combine_conditions (negate , conditions = items )
185
185
186
186
# restriction by dj.U evaluates to True
187
187
if isinstance (condition , U ):
@@ -201,7 +201,7 @@ def combine_conditions(negate, restrictions):
201
201
columns .update (common_attributes )
202
202
return combine_conditions (
203
203
negate ,
204
- restrictions = [
204
+ conditions = [
205
205
prep_value (k , v )
206
206
for k , v in condition .items ()
207
207
if k .split ("." , 1 )[0 ] in common_attributes
@@ -218,7 +218,7 @@ def combine_conditions(negate, restrictions):
218
218
columns .update (common_attributes )
219
219
return combine_conditions (
220
220
negate ,
221
- restrictions = [prep_value (k , condition [k ]) for k in common_attributes ],
221
+ conditions = [prep_value (k , condition [k ]) for k in common_attributes ],
222
222
)
223
223
224
224
# restrict by a QueryExpression subclass -- trigger instantiation and move on
0 commit comments