mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Voucher: Add creation date (Z#23202621) (#5359)
* Voucher: Add creation date (Z#23202621) * Migration fix * Update doc/api/resources/vouchers.rst Co-authored-by: luelista <weller@rami.io> * Update src/pretix/base/migrations/0285_voucher_created.py Co-authored-by: luelista <weller@rami.io> --------- Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -91,6 +91,7 @@ def test_voucher_list(token_client, organizer, event, voucher, item, quota, sube
|
||||
res = dict(TEST_VOUCHER_RES)
|
||||
res['item'] = item.pk
|
||||
res['id'] = voucher.pk
|
||||
res['created'] = voucher.created.isoformat().replace('+00:00', 'Z')
|
||||
res['code'] = voucher.code
|
||||
q2 = copy.copy(quota)
|
||||
q2.pk = None
|
||||
@@ -264,6 +265,7 @@ def test_voucher_detail(token_client, organizer, event, voucher, item):
|
||||
res['item'] = item.pk
|
||||
res['id'] = voucher.pk
|
||||
res['code'] = voucher.code
|
||||
res['created'] = voucher.created.isoformat().replace('+00:00', 'Z')
|
||||
|
||||
resp = token_client.get('/api/v1/organizers/{}/events/{}/vouchers/{}/'.format(organizer.slug, event.slug,
|
||||
voucher.pk))
|
||||
|
||||
Reference in New Issue
Block a user