PPv2: Default pretix_paypal_token_hash_cycle to 1 and not 0

This commit is contained in:
Martin Gross
2022-07-04 16:51:52 +02:00
parent cee72b5a6d
commit 0faf245290
2 changed files with 2 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ class PayPalHttpClient(VendorPayPalHttpClient):
# Cached access tokens are not updated by PayPal to include new Merchants that granted access rights since
# the access token was generated. Therefor we increment the cycle count and by that invalidate the cached
# token and pull a new one.
incr = cache.get('pretix_paypal_token_hash_cycle', default=0)
incr = cache.get('pretix_paypal_token_hash_cycle', default=1)
# Then we get all the items that make up the current credentials and create a hash to detect changes
checksum = hashlib.sha256(''.join([

View File

@@ -211,7 +211,7 @@ def isu_return(request, *args, **kwargs):
try:
cache.incr('pretix_paypal_token_hash_cycle')
except ValueError:
cache.set('pretix_paypal_token_hash_cycle', 0)
cache.set('pretix_paypal_token_hash_cycle', 1)
gs = GlobalSettingsObject()
prov = Paypal(event)