Skip to content

Commit

Permalink
rules: fix prev commit
Browse files Browse the repository at this point in the history
It was failing if there was no ruleset.
  • Loading branch information
regit committed Jul 28, 2017
1 parent 6737b97 commit c0a7330
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rules/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class Meta:

def __init__(self, *args, **kwargs):
super(AddSourceForm, self).__init__(*args, **kwargs)
self.fields['rulesets'].required = False
if 'rulesets' in self.fields:
self.fields['rulesets'].required = False

# Display choices of SourceAtVersion
class RulesetForm(CommentForm):
Expand Down

0 comments on commit c0a7330

Please sign in to comment.