Move SETUP_COMPLETE check up to allow users to add license
Somehow this change got lost.
This commit is contained in:
parent
96b9d702fe
commit
cf61c29671
1 changed files with 7 additions and 7 deletions
|
@ -58,6 +58,13 @@ class SuperUserRegistryStatus(ApiResource):
|
||||||
def get(self):
|
def get(self):
|
||||||
""" Returns the status of the registry. """
|
""" 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 there is no conf/stack volume, then report that status.
|
||||||
if not config_provider.volume_exists():
|
if not config_provider.volume_exists():
|
||||||
return {
|
return {
|
||||||
|
@ -82,13 +89,6 @@ class SuperUserRegistryStatus(ApiResource):
|
||||||
'status': 'setup-db'
|
'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 {
|
return {
|
||||||
'status': 'create-superuser' if not database_has_users() else 'config'
|
'status': 'create-superuser' if not database_has_users() else 'config'
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue