Skip to content

DRY book edit flash message#11775

Merged
mekarpeles merged 1 commit intomasterfrom
edit-message-code-clean-up
Feb 9, 2026
Merged

DRY book edit flash message#11775
mekarpeles merged 1 commit intomasterfrom
edit-message-code-clean-up

Conversation

@jimchamp
Copy link
Copy Markdown
Collaborator

@jimchamp jimchamp commented Jan 30, 2026

Follow-up to #10881
In support of micro edits.

Removes conditional from book editing POST handler that checks if a new book was created. Both branches executed the exact same code...

Also removes boolean variable add, which was only used by the removed conditional.

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings January 30, 2026 00:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the book edit POST handler to remove redundant logic used to decide which flash message to display after saving an edited book (follow-up to #10881).

Changes:

  • Removes the unused add boolean calculation in the book edit POST handler.
  • Collapses an if/else where both branches executed the same add_flash_message(...) call into a single statement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mekarpeles mekarpeles merged commit d8f1ca4 into master Feb 9, 2026
14 checks passed
@mekarpeles mekarpeles deleted the edit-message-code-clean-up branch February 9, 2026 20:56
bhardwajparth51 added a commit to bhardwajparth51/openlibrary that referenced this pull request Feb 17, 2026
…ssage-code-clean-up

DRY book edit flash message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants