Skip to content

Commit

Permalink
[17.0][FIX] bookstore_mgmt_google_books_api: Fix published_date witho…
Browse files Browse the repository at this point in the history
…ut good format
  • Loading branch information
peluko00 committed Jan 14, 2025
1 parent fc25a1b commit cb578d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bookstore_mgmt_google_books_api/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def action_import_from_isbn(self):
book.published_date, "%Y-%m-%d"
).year
except Exception:
published_year = book.published_date
published_year = int(book.published_date[:4])

Check warning on line 36 in bookstore_mgmt_google_books_api/models/product_product.py

View check run for this annotation

Codecov / codecov/patch

bookstore_mgmt_google_books_api/models/product_product.py#L36

Added line #L36 was not covered by tests

data["year_edition"] = published_year

Expand Down
2 changes: 1 addition & 1 deletion bookstore_mgmt_google_books_api/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def action_import_from_isbn(self):
book.published_date, "%Y-%m-%d"
).year
except Exception:
published_year = book.published_date
published_year = int(book.published_date[:4])

Check warning on line 80 in bookstore_mgmt_google_books_api/models/product_template.py

View check run for this annotation

Codecov / codecov/patch

bookstore_mgmt_google_books_api/models/product_template.py#L80

Added line #L80 was not covered by tests

data["year_edition"] = published_year

Expand Down

0 comments on commit cb578d0

Please sign in to comment.