Skip to content

Commit

Permalink
rules: prevent errors messages on initial form display
Browse files Browse the repository at this point in the history
  • Loading branch information
biolds committed Sep 21, 2017
1 parent 6b6fe3d commit e5eddb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,10 @@ def threshold_rule(request, rule_id):

context = {'rule': rule_object, 'thresholds': thresholds, 'containers': containers }
if data['threshold_type'] == 'suppress':
context['form'] = AddRuleSuppressForm(data)
context['form'] = AddRuleSuppressForm(initial=data)
context['type'] = 'suppress'
else:
context['form'] = AddRuleThresholdForm(data)
context['form'] = AddRuleThresholdForm(initial=data)
context['type'] = 'threshold'
return scirius_render(request, 'rules/add_threshold.html', context)

Expand Down

0 comments on commit e5eddb3

Please sign in to comment.