mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix initial checks
This commit is contained in:
parent
ac2d54a150
commit
9552482471
@ -166,7 +166,15 @@ class InvenTreeConfig(AppConfig):
|
||||
)
|
||||
|
||||
# check if all values are present
|
||||
if not (add_user and add_email and add_password):
|
||||
set_variables = 0
|
||||
for tested_var in [add_user, add_email, add_password]:
|
||||
if tested_var:
|
||||
set_variables += 1
|
||||
|
||||
if set_variables == 0:
|
||||
return
|
||||
|
||||
if set_variables < 3:
|
||||
logger.warn('Not all required settings for adding a user on startup are present:\nINVENTREE_SET_USER, INVENTREE_SET_EMAIL, INVENTREE_SET_PASSWORD')
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user