mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 04:56:45 +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
|
# 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')
|
logger.warn('Not all required settings for adding a user on startup are present:\nINVENTREE_SET_USER, INVENTREE_SET_EMAIL, INVENTREE_SET_PASSWORD')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user