Fix some bad logic in the change_form_submit_buttons template tag.

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

chipx86
Review Board
release-4.0.x
reviewboard

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.

Summary
Fix some bad logic in the change_form_submit_buttons template tag.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (e18522d)
Loading...