Fix some bad logic in the change_form_submit_buttons template tag.

Review Request #11349 — Created Dec. 23, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

The new change_form_submit_buttons template tag had some bad logic in
it that could lead to a failure when adding new objects. It made two bad
assumptions:

  1. change was an object (it's a bool)
  2. It could always compute a delete URL (it can't if change == False).

This change fixes up the logic to treat change correctly and to only
generate a delete URL if we know we're showing the link.

Re-tested all types of pages, including change forms creating a new object.

Unit tests pass.

Commits

Files

    Loading...