From: Marcin Haba Date: Fri, 3 May 2019 04:46:18 +0000 (+0200) Subject: baculum: Fix showing graphs if exists finished job with empty start time value X-Git-Tag: Release-9.6.0~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a678b8a66e87300b931e27f17f9e7ee84df65b25;p=thirdparty%2Fbacula.git baculum: Fix showing graphs if exists finished job with empty start time value --- diff --git a/gui/baculum/protected/Web/JavaScript/graph.js b/gui/baculum/protected/Web/JavaScript/graph.js index 5a11cf6002..9a35cd2949 100644 --- a/gui/baculum/protected/Web/JavaScript/graph.js +++ b/gui/baculum/protected/Web/JavaScript/graph.js @@ -51,11 +51,20 @@ var JobClass = jQuery.klass({ }, set_start_stamp: function() { - this.start_stamp = iso_date_to_timestamp(this.job.starttime); + /** + * NOTE: Start time can be null if job finishes with error before + * writing starttime to the Catalog. Noticed for example with staring + * migration job in which no SelectionType defined. + */ + if (this.job.starttime) { + this.start_stamp = iso_date_to_timestamp(this.job.starttime); + } }, set_end_stamp: function() { - this.end_stamp = iso_date_to_timestamp(this.job.endtime); + if (this.job.endtime) { + this.end_stamp = iso_date_to_timestamp(this.job.endtime); + } } });