Browse Source

[raz] Explicitly corce has Raz url to boolean

Romain Rigaux 4 years ago
parent
commit
fb44d6e6ad
1 changed files with 6 additions and 2 deletions
  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',