From fc676efa3050fc0716d8865c4cba87ee055777ca Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Tue, 2 Feb 2016 19:42:48 +0530 Subject: [PATCH] Do not trigger 'pgadmin-session:invalid' event, when a child object do not have any validation error, or the validation error message is null. Thanks Murtuza for find out the root cause. --- web/pgadmin/browser/static/js/datamodel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/browser/static/js/datamodel.js b/web/pgadmin/browser/static/js/datamodel.js index 11c9d5369..4dc290ec3 100644 --- a/web/pgadmin/browser/static/js/datamodel.js +++ b/web/pgadmin/browser/static/js/datamodel.js @@ -794,7 +794,7 @@ function(_, pgAdmin, $, Backbone) { * If the collection was already invalid, we don't need to inform the * parent, or raise the event for the invalid status. */ - if (!isAlreadyInvalid && !_.isUndefined(msg)) { + if (!isAlreadyInvalid && !_.isUndefined(msg) && !_.isNull(msg)) { if (self.handler) { self.handler.trigger('pgadmin-session:model:invalid', msg, self); } else { @@ -815,7 +815,7 @@ function(_, pgAdmin, $, Backbone) { * If the collection was already invalid, we don't need to inform the * parent, or raise the event for the invalid status. */ - if (!isAlreadyInvalid && !_.isUndefined(msg)) { + if (!isAlreadyInvalid && !_.isUndefined(msg) && !_.isNull(msg)) { if (self.handler) { self.handler.trigger('pgadmin-session:model:invalid', msg, self); } else {