Fix a review request issue counter error with failed draft publishing.
Review Request #7045 — Created March 11, 2015 and submitted
We've had a number of reports of -1 issue counter values, with no solid repro case. The reproduction case, it turns out, involves failing to publish a draft. When we attempt to publish a draft on an already-public review request, we first decrement counters, so that any groups or users who will be removed in the draft will have their counters decremented. The idea is that we'd then increment them again after the draft is publish. If the draft fails to publish, we never get that opportunity. We now catch any exceptions and re-increment the values before re-raising the exception. While here, I made NotModifiedError a PublishError. Originally, this was part of my fix, but I decided to make the handling more generic. Anyway, this is probably the right thing to do.
The new unit tests failed with counters being off by 1, without this fix.
With the fix, they had the expected values.All unit tests pass.
Description | From | Last Updated |
---|---|---|
Blank line between these. |
brennie |