Browse Source

HUE-4675 [metastore] Assist not loaded and pointing to the source on the create table from a file page

Johan Ahlen 9 năm trước cách đây
mục cha
commit
c98fff1
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      desktop/core/src/desktop/templates/assist.mako

+ 4 - 2
desktop/core/src/desktop/templates/assist.mako

@@ -1085,8 +1085,10 @@ from metadata.conf import has_navigator
         huePubSub.publish("assist.db.panel.ready");
 
         self.selectedSource.subscribe(function (newSource) {
-          if (newSource && newSource.databases().length === 0) {
-            newSource.initDatabases();
+          if (newSource) {
+            if (newSource.databases().length === 0) {
+              newSource.initDatabases();
+            }
             self.apiHelper.setInTotalStorage('assist', 'lastSelectedSource', newSource.sourceType);
           } else {
             self.apiHelper.setInTotalStorage('assist', 'lastSelectedSource');