diff --git a/backend/experiment/forms.py b/backend/experiment/forms.py index 8de489aee..8765398a3 100644 --- a/backend/experiment/forms.py +++ b/backend/experiment/forms.py @@ -182,6 +182,10 @@ def clean_playlists(self): rules = cl() playlists = self.cleaned_data['playlists'] + + if not playlists: + return self.cleaned_data['playlists'] + playlist_errors = [] # Validate playlists @@ -194,6 +198,8 @@ def clean_playlists(self): if playlist_errors: self.add_error('playlists', playlist_errors) + return self.cleaned_data['playlists'] + class Meta: model = Experiment fields = ['name', 'slug', 'active', 'rules',