Move SETUP_COMPLETE check up to allow users to add license

Somehow this change got lost.
This commit is contained in:
Joseph Schorr 2016-12-05 13:22:14 -05:00
parent 96b9d702fe
commit cf61c29671

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