Merge pull request #2200 from coreos-inc/fix-license-setup

Move SETUP_COMPLETE check up to allow users to add license
This commit is contained in:
josephschorr 2016-12-05 13:53:39 -05:00 committed by GitHub
commit f0b19b26c9

View file

@ -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'
}