Explorar el Código

HUE-4760 [core] Fix error with indexer config when search is disabled

Jenny Kim hace 9 años
padre
commit
0654ecfee4

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

@@ -665,7 +665,7 @@ if USE_NEW_EDITOR.get():
                  <%!
                  from indexer.conf import ENABLE_NEW_INDEXER
                  %>
-                 % if ENABLE_NEW_INDEXER.get():
+                 % if hasattr(ENABLE_NEW_INDEXER, 'get') and ENABLE_NEW_INDEXER.get():
                  <li><a href="${ url('indexer:indexer') }" style="height: 24px; line-height: 24px!important;"><i class="fa fa-plus" style="vertical-align: middle"></i> ${ _('Index') }</a></li>
                  % endif
                  % endif

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/notebook_ko_components.mako

@@ -409,7 +409,7 @@ except ImportError, e:
                 </div>
               </div>
             </div>
-            % if ENABLE_NEW_INDEXER and ENABLE_NEW_INDEXER.get():
+            % if hasattr(ENABLE_NEW_INDEXER, 'get') and ENABLE_NEW_INDEXER.get():
             <div class="control-group">
               <div class="controls">
                 <label class="radio">