Sfoglia il codice sorgente

HUE-7957 [assist] Don't throw errors when a user doesn't have permissions for location updates

Johan Ahlen 7 anni fa
parent
commit
3f5e96abfe

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistDbEntry.js

@@ -307,7 +307,7 @@ var AssistDbEntry = (function () {
     var successCallback = function(sourceMeta) {
       self.entries([]);
       if (!sourceMeta.notFound) {
-        self.catalogEntry.getChildren().done(function (catalogEntries) {
+        self.catalogEntry.getChildren({ silenceErrors: self.navigationSettings.rightAssist }).done(function (catalogEntries) {
           self.hasErrors(false);
           self.loading(false);
           self.loaded = true;

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

@@ -238,7 +238,7 @@ var AssistDbSource = (function () {
 
       DataCatalog.getEntry({ sourceType: self.sourceType, path : [], definition: { type: 'source' }}).done(function (catalogEntry) {
         self.catalogEntry = catalogEntry;
-        self.catalogEntry.getChildren().done(function (databaseEntries) {
+        self.catalogEntry.getChildren({ silenceErrors: self.navigationSettings.rightAssist }).done(function (databaseEntries) {
           self.dbIndex = {};
           var hasNavMeta = false;
           var dbs = [];

+ 1 - 1
desktop/core/src/desktop/templates/assist.mako

@@ -2621,7 +2621,7 @@ from desktop.views import _ko
                   }
 
                   dbDeferred.done(function (dbEntry) {
-                    dbEntry.catalogEntry.getChildren().done(function (tableEntries) {
+                    dbEntry.catalogEntry.getChildren({ silenceErrors: true }).done(function (tableEntries) {
                       var tableName = location.identifierChain[location.identifierChain.length - 1].name;
                       var found = tableEntries.some(function (tableEntry) {
                         if (tableEntry.name === tableName) {