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.
This commit is contained in:
Ashesh Vashi 2016-02-02 19:42:48 +05:30
parent e9497687d0
commit fc676efa30

View File

@ -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 {