Skip to content

Commit

Permalink
on_item call on item (not item[*])
Browse files Browse the repository at this point in the history
  • Loading branch information
rsamf committed Sep 11, 2024
1 parent 84f94b2 commit c2c3109
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions graphbook/steps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ def __call__(self, note: Note) -> StepOutput:
self.on_before_items(note)

if self.item_key is not None:
items = note.items.get(self.item_key, None)
item = note.items.get(self.item_key, None)
assert (
items is not None
item is not None
), f"Item key {self.item_key} not found in Note. Cannot retrieve any iterable."
for item in items:
self.on_item(item, note)
self.on_item(item, note)

self.on_after_items(note)

Expand Down

0 comments on commit c2c3109

Please sign in to comment.