瀏覽代碼

[raz] Explicitly corce has Raz url to boolean

Romain Rigaux 5 年之前
父節點
當前提交
fb44d6e6ad
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      desktop/core/src/desktop/conf.py

+ 6 - 2
desktop/core/src/desktop/conf.py

@@ -2092,11 +2092,15 @@ CONNECTORS = UnspecifiedConfigSection(
   )
 )
 
-def has_raz_url():
+def _get_raz_url():
   """Check if we can guess if Raz is configured"""
   from hadoop.core_site import get_raz_api_url  # Avoid circular import
   return get_raz_api_url()
 
+def has_raz_url():
+  """Check if we can guess if Raz is configured"""
+  return bool(_get_raz_url())
+
 
 RAZ = ConfigSection(
   key='raz',
@@ -2112,7 +2116,7 @@ RAZ = ConfigSection(
         key='api_url',
         help=_('Endpoint to contact'),
         type=str,
-        dynamic_default=has_raz_url,
+        dynamic_default=_get_raz_url,
     ),
     API_AUTHENTICATION=Config(
         key='api_authentication',