updating filter str
This commit is contained in:
@@ -1378,12 +1378,20 @@ class Condition(models.Model):
|
|||||||
max_length=20, choices=conditionchoices, null=True)
|
max_length=20, choices=conditionchoices, null=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
str = 'Condition: {metric} {condition} {value1} {value2}'.format(
|
str = 'Condition: {metric} {condition} {value1}'.format(
|
||||||
metric=self.metric,
|
metric=self.metric,
|
||||||
condition=self.condition,
|
condition=self.condition,
|
||||||
value1 = self.value1,
|
value1 = self.value1,
|
||||||
value2 = self.value2,
|
|
||||||
)
|
)
|
||||||
|
if self.condition == 'between':
|
||||||
|
str = 'Condition: {metric} between {value1} and {value2}'.format(
|
||||||
|
metric=self.metric,
|
||||||
|
condition=self.condition,
|
||||||
|
value1 = self.value1,
|
||||||
|
value2 = self.value2,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return str
|
return str
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user