Fix revocation of secrets that did not exist in the first place

This commit is contained in:
Raphael Michel
2022-04-03 16:33:02 +02:00
parent b4db81d6c3
commit 898776b617

View File

@@ -247,7 +247,7 @@ def assign_ticket_secret(event, position, force_invalidate_if_revokation_list_us
**kwargs
)
changed = position.secret != secret
if position.secret and changed and gen.use_revocation_list:
if position.secret and changed and gen.use_revocation_list and position.pk:
position.revoked_secrets.create(event=event, secret=position.secret)
position.secret = secret
if save and changed: