Skip to content
Snippets Groups Projects
Unverified Commit 0e0a84fd authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Remove redundant error-handling check

This condition can never succeed.

If the voucher is being seen for the first time at this point then it should
start redemption and the check will not pass.

If the voucher has been seen before and was in an error state to begin with
then the check higher up, outside of the loop, prevents execution from ever
entering the loop.

If the voucher has been seen before and just now entered an error state then
the `if not succeeded` check below, on the previous iteration, would stop the
loop and prevent this condition from ever being checked.
parent 73bafe17
No related branches found
No related tags found
1 merge request!131Have PaymentController iterate a voucher's redemption counters
......@@ -832,10 +832,6 @@ class PaymentController(object):
# Reload state before each iteration. We expect it to change each time.
voucher_obj = self.store.get(voucher)
if not voucher_obj.state.should_start_redemption():
# An earlier iteration may have encountered a fatal error.
break
succeeded = yield self._perform_redeem(voucher_obj, counter, tokens)
if not succeeded:
self._log.info(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment