Fix args to error callback when publishing a draft review request.

Review Request #6108 — Created July 15, 2014 and submitted

Information

Review Board
release-2.0.x

Reviewers

It appears, from my testing and from the Firefox debugger, that the error callback in DraftReviewResource.publish() has the same args as .save(), that is, (model, xhr, ...). I believe an earlier change to just (xhr) for the publish() error callback was in error.

Manually generated a PublishError via an extension. Confirmed that the message did not appear in the alert dialog without the fix, and that it did with the fix.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/models/reviewRequestEditorModel.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/models/reviewRequestEditorModel.js
    
    
  2. 
      
MC
MC
david
  1. This looks good for errors coming from the server, but validation errors now break (which is what the earlier commit was fixing). I'm going to change it so that validation errors call the error callback with the same signature as errors from the server.

  2. 
      
MC
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (dc79016)