From 3332df8acc8e6f2d57d2e8304f46e712fcaf7d1b Mon Sep 17 00:00:00 2001 From: Mark Hummel Date: Thu, 18 Apr 2024 19:09:33 -0400 Subject: [PATCH] committing changes to new branch --- api/schema/book.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/schema/book.py b/api/schema/book.py index 67327c5..d0e1f29 100644 --- a/api/schema/book.py +++ b/api/schema/book.py @@ -7,6 +7,7 @@ class BookBase(BaseModel): author: str publication_year: Optional[int] = None rating: Optional[int] = None + genre: Optional[str] = None # TODO # Add a 'genre' field here. You'll need to add it in a few other places as well! @@ -24,7 +25,8 @@ def from_base(base: BookBase, id: int): title = base.title, author = base.author, publication_year = base.publication_year, - rating = base.rating + rating = base.rating, + genre = base.genre )