cli/bookcase_item: fix argument order

This commit is contained in:
2025-05-17 19:54:08 +02:00
parent 9665ab6d17
commit 5bb294a54b
2 changed files with 3 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ class BookcaseItemCli(NumberedCmd):
return _selected_bookcase_item_prompt(self.bookcase_item)
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:
print("Error: could not fetch metadata for this item")

View File

@@ -29,7 +29,8 @@ def is_valid_isbn(isbn: str) -> bool:
def create_bookcase_item_from_isbn(
isbn: str, sql_session: Session
isbn: str,
sql_session: Session,
) -> BookcaseItem | None:
"""
This function fetches metadata for the given ISBN and creates a BookcaseItem from it.