浏览代码

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