Browse Source

HUE-7324 [autocomplete] Prevent js error on column alias selection in the autocomplete dropdown

Johan Ahlen 8 years ago
parent
commit
ba8562e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/core/src/desktop/templates/hue_ace_autocompleter.mako

+ 3 - 1
desktop/core/src/desktop/templates/hue_ace_autocompleter.mako

@@ -97,8 +97,10 @@ from desktop.views import _ko
       <div class="autocompleter-header"><i class="fa fa-fw fa-columns"></i> <span data-bind="text: details.name"></span></div>
       <div class="autocompleter-details-contents">
         <div class="autocompleter-details-contents-inner">
+          <!-- ko if: typeof details.database !== 'undefined' && typeof details.table !== 'undefined' -->
           <div class="details-attribute" ><i class="fa fa-table fa-fw"></i> <span data-bind="text: details.database"></span>.<span data-bind="text: details.table"></span></div>
-          <!-- ko if: partitionKey -->
+          <!-- /ko -->
+          <!-- ko if: typeof partitionKey !== 'undefined' && partitionKey -->
           <div class="details-attribute" ><i class="fa fa-key fa-fw"></i> ${ _('Partition key') }</div>
           <!-- /ko -->
           <!-- ko if: typeof details.primary_key !== 'undefined' && details.primary_key === 'true' -->