1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +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: elif table_filter:
req_key = list(table_filter.keys())[0] req_key = list(table_filter.keys())[0]
req_val = list(table_filter.values())[0] req_val = list(table_filter.values())[0]
matched_values = []
for value in self.values: for value in self.values:
if value[req_key] == req_val: if value[req_key] == req_val:
if pluck: if pluck:
return value.get(pluck) return value.get(pluck)
else: else:
return value matched_values.append(value)
return matched_values
class DB: class DB: