Reordered transaction rollback to be called before an error is raised.

Review Request #9494 — Created Jan. 19, 2018 and submitted

Information

Review Board
release-4.0.x
d6445c2...

Reviewers

The loaddb management command had a bug where the code to rollback the
transaction occured after a "raise", meaning it would never be reached.
I reordered this so the raise happens after the transaction code.

There aren't a ton of tests in the reviewboard/admin module but the 5 tests in there ran successfully.

Description From Last Updated

The bug number should go in the Bugs field, instead of having a URL in the description.

chipx86chipx86

The description should be capped at around 75 characters. Many editors will enforce a line length for Git commits, which …

chipx86chipx86

Testing doesn't really need to describe the state of the tests in the directory. However, you should introduce unit tests …

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    The bug number should go in the Bugs field, instead of having a URL in the description.

  3. Show all issues

    The description should be capped at around 75 characters. Many editors will enforce a line length for Git commits, which is applicable here.

  4. Show all issues

    Testing doesn't really need to describe the state of the tests in the directory. However, you should introduce unit tests for anything you fix, or we can't prove it was fixed (or that it won't regress).

    1. I'm not sure this particular thing can be unit tested.

    2. Okay, I've been trying to figure out how I would set up a unit test for this if I was going to but haven't gotten anywhere yet. Should I just leave it?

  5. 
      
JC
david
  1. Ship It!
  2. 
      
JC
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (b578695)