Skip to content

Commit

Permalink
Fix _update_insetions_table typo (issue #179)
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Jan 14, 2025
1 parent 567ae7d commit 7f1c9dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions one/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2262,20 +2262,20 @@ def search_insertions(self, details=False, query_type=None, **kwargs):
if len(ins) == 0:
pass # no need to update cache here
elif isinstance(ins, list): # not a paginated response
self._update_insetions_table(ins)
self._update_insertions_table(ins)
else:
# populate first page
self._update_insetions_table(ins._cache[:ins.limit])
self._update_insertions_table(ins._cache[:ins.limit])
# Add callback for updating cache on future fetches
ins.add_callback(WeakMethod(self._update_insetions_table))
ins.add_callback(WeakMethod(self._update_insertions_table))

pids = util.LazyId(ins)
if not details:
return pids

return pids, ins

def _update_insetions_table(self, insertions_records):
def _update_insertions_table(self, insertions_records):
"""Update the insertions tables with a list of insertions records.
Parameters
Expand Down

0 comments on commit 7f1c9dc

Please sign in to comment.