Skip to content

Commit e986798

Browse files
Fix validation the number of responsible persons in forms.py
1 parent f2c4e7b commit e986798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def clean(self):
5050

5151
# If this is a subtask,
5252
# then there should be only one responsible person.
53-
if 'responsible' in self.changed_data and 'task' in self.cleaned_data:
53+
if 'responsible' in self.changed_data and self.cleaned_data.get('task', None):
5454
if 'responsible' in self.cleaned_data:
5555
responsible_num = len(self.cleaned_data.get('responsible'))
5656
if responsible_num > 1:

0 commit comments

Comments
 (0)