Преглед на файлове

HUE-8546 [assist] Limit assist refresh to the active namespace for DDL statement executions

Johan Ahlen преди 7 години
родител
ревизия
77b97f0
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

+ 4 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

@@ -401,9 +401,12 @@ var AssistDbNamespace = (function () {
 
     if (!self.navigationSettings.rightAssist) {
       huePubSub.subscribe('data.catalog.entry.refreshed', function (details) {
+        if (self.namespace.id !== details.entry.namespace.id || details.entry.getSourceType() !== self.sourceType) {
+          return;
+        }
         if (self.catalogEntry === details.entry) {
           self.initDatabases();
-        } else if (details.entry.getSourceType() === self.sourceType) {
+        } else {
           var findAndReloadInside = function (entries) {
             return entries.some(function (entry) {
               if (entry.catalogEntry.path.join('.') === details.entry.path.join('.')) {