From 76cba955f4f1236bda20552dcb66be83887018a8 Mon Sep 17 00:00:00 2001 From: "Timothy M. Shead" Date: Wed, 20 May 2015 15:21:56 +0000 Subject: [PATCH] Handle legacy models without a "result" field gracefully in the client code. Closes #430. --- web-server/js/slycat-navbar.js | 4 ++-- web-server/templates/slycat-project.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web-server/js/slycat-navbar.js b/web-server/js/slycat-navbar.js index 954363a44..3b511fc7a 100644 --- a/web-server/js/slycat-navbar.js +++ b/web-server/js/slycat-navbar.js @@ -79,7 +79,7 @@ define("slycat-navbar", ["slycat-server-root", "slycat-web-client", "slycat-chan if(model.state() == "running") alerts.push({"type":"success", "message":"The model is being computed. Patience!", "detail":null}) - if(model.result() == "failed") + if(model.result && model.result() == "failed") alerts.push({"type":"danger", "message":"Model failed to build. Here's what was happening when things went wrong:", "detail": model.message()}) } @@ -326,7 +326,7 @@ define("slycat-navbar", ["slycat-server-root", "slycat-web-client", "slycat-chan \
  • \ \ - \ + \ \ \
  • \ diff --git a/web-server/templates/slycat-project.html b/web-server/templates/slycat-project.html index 55eebe9fc..60b0464a7 100644 --- a/web-server/templates/slycat-project.html +++ b/web-server/templates/slycat-project.html @@ -27,7 +27,7 @@

    Models

    - Failed + Failed