Fix module import on auto sync

This commit is contained in:
M1ha 2018-12-19 11:34:00 +05:00
parent b94195c1f1
commit 59f0efae15

View File

@ -28,7 +28,10 @@ def clickhouse_auto_sync():
"""
# Import all model modules
for app in settings.INSTALLED_APPS:
try:
import_submodules("%s.%s" % (app, config.MODELS_MODULE))
except ImportError:
pass
# Start
for cls in get_subclasses(ClickHouseModel, recursive=True):