Merge pull request #106 from tinyclues/master
[fixes #68] Use hash_key in query to filter returned items
This commit is contained in:
commit
76553671f2
@ -182,7 +182,11 @@ class Table(object):
|
|||||||
results = []
|
results = []
|
||||||
last_page = True # Once pagination is implemented, change this
|
last_page = True # Once pagination is implemented, change this
|
||||||
|
|
||||||
|
if self.range_key_attr:
|
||||||
|
possible_results = self.items[hash_key].values()
|
||||||
|
else:
|
||||||
possible_results = list(self.all_items())
|
possible_results = list(self.all_items())
|
||||||
|
|
||||||
if range_comparison:
|
if range_comparison:
|
||||||
for result in possible_results:
|
for result in possible_results:
|
||||||
if result.range_key.compare(range_comparison, range_objs):
|
if result.range_key.compare(range_comparison, range_objs):
|
||||||
|
Loading…
Reference in New Issue
Block a user