From cf61c29671cf0bf78f284fbbc9cbca396fc9d4f5 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 5 Dec 2016 13:22:14 -0500 Subject: [PATCH] Move SETUP_COMPLETE check up to allow users to add license Somehow this change got lost. --- endpoints/api/suconfig.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/endpoints/api/suconfig.py b/endpoints/api/suconfig.py index 9235e8ef3..eedbd15f0 100644 --- a/endpoints/api/suconfig.py +++ b/endpoints/api/suconfig.py @@ -58,6 +58,13 @@ class SuperUserRegistryStatus(ApiResource): def get(self): """ Returns the status of the registry. """ + # If we have SETUP_COMPLETE, then we're ready to go! + if app.config.get('SETUP_COMPLETE', False): + return { + 'requires_restart': config_provider.requires_restart(app.config), + 'status': 'ready' + } + # If there is no conf/stack volume, then report that status. if not config_provider.volume_exists(): return { @@ -82,13 +89,6 @@ class SuperUserRegistryStatus(ApiResource): 'status': 'setup-db' } - # If we have SETUP_COMPLETE, then we're ready to go! - if app.config.get('SETUP_COMPLETE', False): - return { - 'requires_restart': config_provider.requires_restart(app.config), - 'status': 'ready' - } - return { 'status': 'create-superuser' if not database_has_users() else 'config' }