alert create including filters
This commit is contained in:
@@ -1030,7 +1030,20 @@ class ConditionEditForm(ModelForm):
|
||||
model = Condition
|
||||
fields = ['metric','condition','value1','value2']
|
||||
|
||||
|
||||
class BaseConditionFormSet(BaseFormSet):
|
||||
def clean(self):
|
||||
if any(self.errors):
|
||||
return
|
||||
|
||||
for form in self.forms:
|
||||
if form.cleaned_data:
|
||||
metric = form.cleaned_data['metric']
|
||||
condition = form.cleaned_data['condition']
|
||||
value1 = form.cleaned_data['value1']
|
||||
value2 = form.cleaned_data['value2']
|
||||
|
||||
|
||||
|
||||
rowchoices = []
|
||||
for key,value in mytypes.workouttypes:
|
||||
if key in mytypes.rowtypes:
|
||||
|
||||
Reference in New Issue
Block a user