mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-09 22:35:50 +00:00
fix title case in tags
This commit is contained in:
parent
3ef9346466
commit
c370e2508a
@ -25,7 +25,7 @@ def set_book_tags(book: m.Book, tags: str):
|
||||
for book_tag in book_tags:
|
||||
db.session.delete(book_tag)
|
||||
|
||||
tags_names = [tag.title() for tag in tags.split(",") if len(tag)]
|
||||
tags_names = [tag.lower() for tag in tags.split(",") if len(tag)]
|
||||
|
||||
for tag_name in tags_names:
|
||||
try:
|
||||
|
@ -23,7 +23,7 @@ def test_create_tags_on_book_create_and_edit(client: FlaskClient):
|
||||
book = m.Book.query.filter_by(label=BOOK_NAME).first()
|
||||
assert book.tags
|
||||
|
||||
splitted_tags = [tag.title() for tag in tags.split(",")]
|
||||
splitted_tags = [tag.lower() for tag in tags.split(",")]
|
||||
assert len(book.tags) == 3
|
||||
for tag in book.tags:
|
||||
tag: m.Tag
|
||||
@ -42,7 +42,7 @@ def test_create_tags_on_book_create_and_edit(client: FlaskClient):
|
||||
|
||||
book: m.Book = m.Book.query.first()
|
||||
|
||||
splitted_tags = [tag.title() for tag in tags.split(",")]
|
||||
splitted_tags = [tag.lower() for tag in tags.split(",")]
|
||||
assert len(book.tags) == 3
|
||||
for tag in book.tags:
|
||||
tag: m.Tag
|
||||
|
Loading…
x
Reference in New Issue
Block a user