cli/bookcase_item: fix argument order
This commit is contained in:
@@ -51,7 +51,7 @@ class BookcaseItemCli(NumberedCmd):
|
|||||||
return _selected_bookcase_item_prompt(self.bookcase_item)
|
return _selected_bookcase_item_prompt(self.bookcase_item)
|
||||||
|
|
||||||
def do_update_data(self, _: str):
|
def do_update_data(self, _: str):
|
||||||
item = create_bookcase_item_from_isbn(self.sql_session, str(self.bookcase_item.isbn))
|
item = create_bookcase_item_from_isbn(str(self.bookcase_item.isbn), self.sql_session)
|
||||||
|
|
||||||
if item is None:
|
if item is None:
|
||||||
print("Error: could not fetch metadata for this item")
|
print("Error: could not fetch metadata for this item")
|
||||||
|
@@ -29,7 +29,8 @@ def is_valid_isbn(isbn: str) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def create_bookcase_item_from_isbn(
|
def create_bookcase_item_from_isbn(
|
||||||
isbn: str, sql_session: Session
|
isbn: str,
|
||||||
|
sql_session: Session,
|
||||||
) -> BookcaseItem | None:
|
) -> BookcaseItem | None:
|
||||||
"""
|
"""
|
||||||
This function fetches metadata for the given ISBN and creates a BookcaseItem from it.
|
This function fetches metadata for the given ISBN and creates a BookcaseItem from it.
|
||||||
|
Reference in New Issue
Block a user