Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit 76b01a1

Browse files
committed
Fix call to complex filter and usage of additionalOprands
1 parent 5dbff32 commit 76b01a1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

FuelSDK/rest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ def __init__(self, auth_stub):
150150

151151
def additionalOperandToSimpleFilter(self, operand):
152152
simpleFilter = self.auth_stub.soap_client.factory.create('SimpleFilterPart')
153-
for k, v in additional_operand.items():
153+
for k, v in operand.items():
154154
simpleFilter[k] = v
155155
return simpleFilter
156156

157157

158158
def complexFilter(self, leftOperand, rightOperand, logicalOperator, additionalOperands):
159159
complexFilter = self.auth_stub.soap_client.factory.create('ComplexFilterPart')
160160

161-
complexFilter["LeftOperand"] = self.filterFor(self.auth_stub, leftOperand)
162-
complexFilter["RightOperand"] = self.filterFor(self.auth_stub, rightOperand)
161+
complexFilter["LeftOperand"] = self.filterFor(leftOperand)
162+
complexFilter["RightOperand"] = self.filterFor(rightOperand)
163163
complexFilter["LogicalOperator"] = logicalOperator
164164

165165
for op in additionalOperands:
@@ -182,13 +182,13 @@ def simpleFilter(self, operand):
182182
def filterFor(self, operand):
183183
result = None
184184
if operand.has_key('LogicalOperator'):
185-
result = self.complexFilter(self.auth_stub,
185+
result = self.complexFilter(
186186
operand["LeftOperand"],
187187
operand["RightOperand"],
188188
operand["LogicalOperator"],
189189
operand.get('AdditionalOperands', []))
190190
else:
191-
result = self.simpleFilter(self.auth_stub, operand)
191+
result = self.simpleFilter(operand)
192192

193193
return result
194194

0 commit comments

Comments
 (0)