mirror of
https://github.com/pretix/pretix.git
synced 2026-06-12 01:35:16 +00:00
Remove media_exchange_supported-Flag: Checkin will always be denied if media needs to be exchanged; apps will fall back to explanation text
This commit is contained in:
committed by
Raphael Michel
parent
4522dd25b0
commit
1f4189d539
@@ -948,7 +948,7 @@ def perform_checkin(op: OrderPosition, clist: CheckinList, given_answers: dict,
|
||||
ignore_unpaid=False, nonce=None, datetime=None, questions_supported=True,
|
||||
user=None, auth=None, canceled_supported=False, type=Checkin.TYPE_ENTRY,
|
||||
raw_barcode=None, raw_source_type=None, from_revoked_secret=False, simulate=False,
|
||||
gate=None, media_exchange_supported=False, reusable_media=None):
|
||||
gate=None, reusable_media=None):
|
||||
"""
|
||||
Create a checkin for this particular order position and check-in list. Fails with CheckInError if the check in is
|
||||
not valid at this time.
|
||||
@@ -960,8 +960,6 @@ def perform_checkin(op: OrderPosition, clist: CheckinList, given_answers: dict,
|
||||
questions are not filled out.
|
||||
:param ignore_unpaid: When set to True, this will succeed even when the order is unpaid.
|
||||
:param questions_supported: When set to False, questions are ignored
|
||||
:param media_exchange_supported: When set to False, required media exchanges are ignored; but access will still be
|
||||
denied
|
||||
:param nonce: A random nonce to prevent race conditions.
|
||||
:param datetime: The datetime of the checkin, defaults to now.
|
||||
:param simulate: If true, the check-in is not saved.
|
||||
@@ -1117,18 +1115,12 @@ def perform_checkin(op: OrderPosition, clist: CheckinList, given_answers: dict,
|
||||
linked_media = op.linked_media
|
||||
if not reusable_media and required_media_policy and required_media_type and not force:
|
||||
if not linked_media.exists():
|
||||
if media_exchange_supported:
|
||||
raise RequiredMediaExchangeError(
|
||||
_('Ticket needs to be exchanged to a suitable medium.'),
|
||||
'exchange',
|
||||
required_media_policy,
|
||||
required_media_type
|
||||
)
|
||||
else:
|
||||
raise CheckInError(
|
||||
_('Ticket needs to be exchanged to a suitable medium.'),
|
||||
'product'
|
||||
)
|
||||
raise RequiredMediaExchangeError(
|
||||
_('Ticket needs to be exchanged to a suitable medium.'),
|
||||
'exchange',
|
||||
required_media_policy,
|
||||
required_media_type
|
||||
)
|
||||
elif op.organizer.settings.reusable_media_usage_enforced:
|
||||
raise CheckInError(
|
||||
_('This ticket has already been exchanged for a reusable medium that now needs to be used instead.'),
|
||||
|
||||
Reference in New Issue
Block a user