Checks were moved to the ready() method of the ServerConfig class, the runs only once when the webui is started.
I also changed the way django.contrib.auth.models.User is loaded: instead of importing it, there is a django get_user_model function that loads it at runtime.
This change allows for instance to run commands such as oq mosaic aristotle mosaic_dir without the automatic check on the presence of mosaic_dir in openquake.cfg.
Checks were moved to the
ready()
method of the ServerConfig class, the runs only once when the webui is started. I also changed the waydjango.contrib.auth.models.User
is loaded: instead of importing it, there is a djangoget_user_model
function that loads it at runtime.This change allows for instance to run commands such as
oq mosaic aristotle mosaic_dir
without the automatic check on the presence ofmosaic_dir
inopenquake.cfg
.Fixes https://github.com/gem/oq-engine/issues/9718