Преглед изворни кода

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('.')) {