mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Enforce that questions cannot depend on other question which are asked during checkin (Z#2352753)
This commit is contained in:
@@ -249,6 +249,9 @@ class QuestionSerializer(I18nAwareModelSerializer):
|
||||
|
||||
dep = full_data.get('dependency_question')
|
||||
if dep:
|
||||
if dep.ask_during_checkin:
|
||||
raise ValidationError(_('Question cannot depend on a question asked during check-in.'))
|
||||
|
||||
seen_ids = {self.instance.pk} if self.instance else set()
|
||||
while dep:
|
||||
if dep.pk in seen_ids:
|
||||
|
||||
Reference in New Issue
Block a user