Skip to content

Commit

Permalink
apps/newsletters: make clean more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzylogic2000 committed Apr 25, 2022
1 parent d0ff904 commit bfbe1f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meinberlin/apps/newsletters/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, user=None, organisation=None, *args, **kwargs):

def clean(self):
cleaned_data = super().clean()
if cleaned_data.get('receivers') == str(models.PROJECT) and \
if int(cleaned_data.get('receivers')) == models.PROJECT and \
not cleaned_data.get('project'):
self.add_error('project', _('Select a Project'))

Expand Down

0 comments on commit bfbe1f2

Please sign in to comment.