mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 13:10:57 +00:00
Refactor "ready" state into a function
This commit is contained in:
@ -3,11 +3,14 @@ from __future__ import unicode_literals
|
||||
import os
|
||||
import logging
|
||||
|
||||
from PIL import UnidentifiedImageError
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
from django.conf import settings
|
||||
|
||||
from PIL import UnidentifiedImageError
|
||||
from InvenTree.ready import canAppAccessDatabase
|
||||
|
||||
|
||||
logger = logging.getLogger("inventree")
|
||||
|
||||
@ -20,7 +23,8 @@ class CompanyConfig(AppConfig):
|
||||
This function is called whenever the Company app is loaded.
|
||||
"""
|
||||
|
||||
self.generate_company_thumbs()
|
||||
if canAppAccessDatabase():
|
||||
self.generate_company_thumbs()
|
||||
|
||||
def generate_company_thumbs(self):
|
||||
|
||||
|
Reference in New Issue
Block a user