Remove requirement for superuser when loading existing config
This commit is contained in:
parent
2819c264cd
commit
9b23c7a174
1 changed files with 4 additions and 0 deletions
|
@ -102,6 +102,10 @@ class SuperUserRegistryStatus(ApiResource):
|
|||
'status': 'setup-db'
|
||||
}
|
||||
|
||||
config = config_provider.get_config()
|
||||
if config and config['SETUP_COMPLETE']:
|
||||
return 'config'
|
||||
|
||||
return {
|
||||
'status': 'create-superuser' if not database_has_users() else 'config'
|
||||
}
|
||||
|
|
Reference in a new issue