Ensure uniqueness of question identifiers (#2358)

This commit is contained in:
Raphael Michel
2022-09-20 10:20:56 +02:00
committed by GitHub
parent 913a83b43d
commit cf622392c0
4 changed files with 52 additions and 1 deletions

View File

@@ -129,6 +129,11 @@ class QuestionForm(I18nModelForm):
return val
def clean_identifier(self):
val = self.cleaned_data.get('identifier')
Question._clean_identifier(self.instance.event, val, self.instance)
return val
def clean(self):
d = super().clean()
if d.get('dependency_question') and not d.get('dependency_values'):