forked from CGM_Public/pretix_original
Webhooks: Add vouchers (Z#23203072) (#5360)
* Webhooks: Add vouchers (Z#23203072) This also requires more consistent usage of webhook types to avoid vouchers not being known to the external system. * Update src/pretix/api/webhooks.py Co-authored-by: luelista <weller@rami.io> * Fix shredder test --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -207,16 +207,19 @@ class WaitingListEntry(LoggedModel):
|
||||
block_quota=True,
|
||||
subevent=self.subevent,
|
||||
)
|
||||
v.log_action('pretix.voucher.added.waitinglist', {
|
||||
v.log_action('pretix.voucher.added', {
|
||||
'item': self.item.pk,
|
||||
'variation': self.variation.pk if self.variation else None,
|
||||
'tag': 'waiting-list',
|
||||
'block_quota': True,
|
||||
'valid_until': v.valid_until.isoformat(),
|
||||
'max_usages': 1,
|
||||
'subevent': self.subevent.pk if self.subevent else None,
|
||||
'source': 'waitinglist',
|
||||
}, user=user, auth=auth)
|
||||
v.log_action('pretix.voucher.added.waitinglist', {
|
||||
'email': self.email,
|
||||
'waitinglistentry': self.pk,
|
||||
'subevent': self.subevent.pk if self.subevent else None,
|
||||
}, user=user, auth=auth)
|
||||
self.voucher = v
|
||||
self.save()
|
||||
|
||||
Reference in New Issue
Block a user