1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Correct how the table_filter works

This commit is contained in:
phxntxm 2017-06-12 02:08:31 -05:00
parent e6bdf6c8f3
commit 9604d5a4ea

View file

@ -59,12 +59,15 @@ class Cache:
elif table_filter:
req_key = list(table_filter.keys())[0]
req_val = list(table_filter.values())[0]
matched_values = []
for value in self.values:
if value[req_key] == req_val:
if pluck:
return value.get(pluck)
else:
return value
matched_values.append(value)
return matched_values
class DB: