From 46df05e099675d440cbd1bca8f78510eecaba7e1 Mon Sep 17 00:00:00 2001 From: dimakarp1996 Date: Tue, 21 Feb 2023 08:18:39 +0300 Subject: [PATCH] Book skill fix (#326) * Book skill fix Default phrase as in alexa * Update wiki.py * fix: no empty string as default value --------- Co-authored-by: dilyararimovna --- skills/dff_book_skill/tools/wiki.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skills/dff_book_skill/tools/wiki.py b/skills/dff_book_skill/tools/wiki.py index 8127eeb7e5..a2e97f3941 100644 --- a/skills/dff_book_skill/tools/wiki.py +++ b/skills/dff_book_skill/tools/wiki.py @@ -301,7 +301,7 @@ def get_booklist(plain_author_name: str) -> str: def best_plain_book_by_author( plain_author_name: str, - default_phrase: str, + default_phrase: str = None, plain_last_bookname: Optional[str] = None, top_n_best_books: int = 1, ) -> Optional[str]: @@ -309,6 +309,7 @@ def best_plain_book_by_author( Look up a book for an author """ logger.debug(f"Calling best_plain_book_by_author for {plain_author_name} {plain_last_bookname}") + default_phrase = "" if default_phrase is None else default_phrase # best books last_bookname = "NO_BOOK" try: