Skip to content

Commit d3020e4

Browse files
authored
Remove unnecessary condition
1 parent 1ea955f commit d3020e4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

openlibrary/plugins/upstream/addbook.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -902,21 +902,11 @@ def POST(self, key):
902902
else:
903903
work = None
904904

905-
add = (
906-
edition.revision == 1
907-
and work
908-
and work.revision == 1
909-
and work.edition_count == 1
910-
)
911-
912905
try:
913906
helper = SaveBookHelper(work, edition)
914907
helper.save(web.input())
915908

916-
if add:
917-
add_flash_message("info", utils.get_message("flash_catalog_updated"))
918-
else:
919-
add_flash_message("info", utils.get_message("flash_catalog_updated"))
909+
add_flash_message("info", utils.get_message("flash_catalog_updated"))
920910

921911
if i.work_key and i.work_key.startswith('/works/'):
922912
url = i.work_key

0 commit comments

Comments
 (0)