mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-20 15:05:12 +00:00
Refactor "ready" state into a function
This commit is contained in:
1 parent
6e5fc43105
commit
06afd4d726
8 files changed
+60
-33
No files matched your search
@@ -1,11 +1,12 @@
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import logging
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.conf import settings
|
||||
|
||||
from InvenTree.ready import canAppAccessDatabase
|
||||
|
||||
|
||||
logger = logging.getLogger("inventree")
|
||||
|
||||
@@ -18,9 +19,7 @@ class ReportConfig(AppConfig):
|
||||
This function is called whenever the report app is loaded
|
||||
"""
|
||||
|
||||
if 'loaddata' in sys.argv:
|
||||
pass
|
||||
else:
|
||||
if canAppAccessDatabase():
|
||||
self.create_default_test_reports()
|
||||
self.create_default_build_reports()
|
||||
|
||||
|
||||
Reference in new issue
Block a user