Skip to content

Commit

Permalink
fix: Fix return value in the experiment form's clean_playlists method
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Jun 3, 2024
1 parent 9349a31 commit 058c282
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/experiment/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',
Expand Down

0 comments on commit 058c282

Please sign in to comment.