Skip to contentSkip to conversation

toaster: Fix comparison in recipe template

PATCH New Karsten Strand 1 participant 1 message Aug 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: Fix comparison in recipe template

Use == instead of = when comparing task outcome to OUTCOME_FAILED.

Prior to this fix the recipe template would cause a TemplateSyntaxError exception.

---
 lib/toaster/toastergui/templates/recipe.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/recipe.html +1 -1
index bf2cd71..3f76e65 100644
@@ -176,7 +176,7 @@
                     <td>{{task.get_executed_display}}</td>
 
                     <td>{{task.get_outcome_display}} 
-                        {% if task.outcome = task.OUTCOME_FAILED %}
+                        {% if task.outcome == task.OUTCOME_FAILED %}
                             <a href="{% url 'build_artifact' build.pk "tasklogfile" task.pk %}">
                                 <span class="glyphicon glyphicon-download-alt
                                     get-help" title="Download task log
Signature · 1 line
2.7.4