Skip to content

Commit b6d5d36

Browse files
Copilotmekarpeles
andcommitted
Fix boolean parameter handling for bulk delete
Co-authored-by: mekarpeles <978325+mekarpeles@users.noreply.github.com>
1 parent 3f76fce commit b6d5d36

File tree

1 file changed

+2
-1
lines changed
  • openlibrary/plugins/openlibrary

1 file changed

+2
-1
lines changed

openlibrary/plugins/openlibrary/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,8 @@ def POST(self, work_id: str):
659659

660660
web_input = web.input(comment=None, bulk=False)
661661
comment = web_input.get('comment')
662-
bulk = web_input.bulk
662+
# Convert bulk parameter to boolean (handles both 'true'/'True' strings and boolean values)
663+
bulk = str(web_input.bulk).lower() in ('true', '1', 'yes')
663664

664665
user = accounts.get_current_user()
665666

0 commit comments

Comments
 (0)