Don't show initially created rules as failed
This commit is contained in:
parent
f3b4319c2d
commit
c6fda4fcee
2 changed files with 8 additions and 4 deletions
|
|
@ -71,3 +71,7 @@ class CollectionRule(TimeStampedModel):
|
|||
return reverse("news:collection:subreddit-update", kwargs={"pk": self.pk})
|
||||
|
||||
return reverse("news:collection:feed-update", kwargs={"pk": self.pk})
|
||||
|
||||
@property
|
||||
def failed(self):
|
||||
return not self.succeeded and self.last_run
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
</thead>
|
||||
<tbody class="table__body">
|
||||
{% for rule in rules %}
|
||||
<tr class="table__row {% if not rule.succeeded %}table__row--error {% endif %}rules-table__row">
|
||||
<tr class="table__row {% if rule.failed %}table__row--error {% endif %}rules-table__row">
|
||||
<td class="table__item rules-table__item">
|
||||
{% with rule|id_for_label:"rules" as id_for_label %}
|
||||
{% include "components/form/checkbox.html" with name="rules" value=rule.pk id=id_for_label id_for_label=id_for_label %}
|
||||
|
|
@ -55,10 +55,10 @@
|
|||
<a class="link" href="{{ rule.url }}" target="_blank" rel="noopener noreferrer">{{ rule.url }}</a>
|
||||
</td>
|
||||
<td class="table__item rules-table__item">
|
||||
{% if rule.succeeded %}
|
||||
<i class="gg-check"></i>
|
||||
{% else %}
|
||||
{% if rule.failed %}
|
||||
<i class="gg-danger"></i>
|
||||
{% else %}
|
||||
<i class="gg-check"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="table__item rules-table__item">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue