diff --git a/src/pretix/api/serializers/checkin.py b/src/pretix/api/serializers/checkin.py index 300e4352df..63759c0160 100644 --- a/src/pretix/api/serializers/checkin.py +++ b/src/pretix/api/serializers/checkin.py @@ -85,7 +85,6 @@ class CheckinRPCRedeemInputSerializer(serializers.Serializer): ignore_unpaid = serializers.BooleanField(default=False, required=False) questions_supported = serializers.BooleanField(default=True, required=False) use_order_locale = serializers.BooleanField(default=False, required=False) - media_exchange_supported = serializers.BooleanField(default=False, required=False) nonce = serializers.CharField(required=False, allow_null=True) datetime = serializers.DateTimeField(required=False, allow_null=True) answers = serializers.JSONField(required=False, allow_null=True) diff --git a/src/pretix/api/views/checkin.py b/src/pretix/api/views/checkin.py index 282729c6a2..c01a32eede 100644 --- a/src/pretix/api/views/checkin.py +++ b/src/pretix/api/views/checkin.py @@ -455,8 +455,7 @@ def _checkin_list_position_queryset(checkinlists, ignore_status=False, ignore_pr def _redeem_process(*, checkinlists, raw_barcode, answers_data, datetime, force, checkin_type, ignore_unpaid, nonce, untrusted_input, user, auth, expand, pdf_data, request, questions_supported, canceled_supported, - media_exchange_supported, source_type='barcode', legacy_url_support=False, simulate=False, - gate=None, use_order_locale=False): + source_type='barcode', legacy_url_support=False, simulate=False, gate=None, use_order_locale=False): if not checkinlists: raise ValidationError('No check-in list passed.') @@ -814,7 +813,6 @@ def _redeem_process(*, checkinlists, raw_barcode, answers_data, datetime, force, datetime=datetime, questions_supported=questions_supported, canceled_supported=canceled_supported, - media_exchange_supported=media_exchange_supported, user=user, auth=auth, type=checkin_type, @@ -995,7 +993,6 @@ class CheckinListPositionViewSet(viewsets.ReadOnlyModelViewSet): pdf_data=self.request.query_params.get('pdf_data', 'false').lower() == 'true', questions_supported=self.request.data.get('questions_supported', True), canceled_supported=self.request.data.get('canceled_supported', False), - media_exchange_supported=self.request.data.get('media_exchange_supported', False), request=self.request, # this is not clean, but we need it in the serializers for URL generation legacy_url_support=True, ) @@ -1032,7 +1029,6 @@ class CheckinRPCRedeemView(views.APIView): questions_supported=s.validated_data['questions_supported'], use_order_locale=s.validated_data['use_order_locale'], canceled_supported=True, - media_exchange_supported=s.validated_data.get('media_exchange_supported', False), request=self.request, # this is not clean, but we need it in the serializers for URL generation legacy_url_support=False, ) diff --git a/src/pretix/base/services/checkin.py b/src/pretix/base/services/checkin.py index 9b38a35537..67a9e8f6b6 100644 --- a/src/pretix/base/services/checkin.py +++ b/src/pretix/base/services/checkin.py @@ -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.'), diff --git a/src/pretix/control/forms/checkin.py b/src/pretix/control/forms/checkin.py index 51d21dd977..c1dee0443f 100644 --- a/src/pretix/control/forms/checkin.py +++ b/src/pretix/control/forms/checkin.py @@ -192,11 +192,6 @@ class CheckinListSimulatorForm(forms.Form): initial=True, required=False, ) - media_exchange_supported = forms.BooleanField( - label=_("Support for media exchange"), - initial=True, - required=False, - ) gate = SafeModelChoiceField( label=_('Gate'), empty_label=_('All gates'), diff --git a/src/pretix/control/templates/pretixcontrol/checkin/simulator.html b/src/pretix/control/templates/pretixcontrol/checkin/simulator.html index 4b4251ef1f..48b5c5e240 100644 --- a/src/pretix/control/templates/pretixcontrol/checkin/simulator.html +++ b/src/pretix/control/templates/pretixcontrol/checkin/simulator.html @@ -35,7 +35,6 @@ {% bootstrap_field form.gate layout="control" %} {% bootstrap_field form.ignore_unpaid layout="control" %} {% bootstrap_field form.questions_supported layout="control" %} - {% bootstrap_field form.media_exchange_supported layout="control" %}