[BUGFIX] Fixed buildwatson error with no admin installed

Buildwatson gives crashes on following error when admin is not
installed:

LookupError: No installed app with label 'admin'
This commit is contained in:
Krukas 2019-10-30 17:12:41 +01:00 committed by Guillaume Baffoin
parent d0d9dd3091
commit 863b427900
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ from watson.models import SearchEntry
# Sets up registration for django-watson's admin integration.
admin.autodiscover()
if apps.is_installed("django.contrib.admin"):
admin.autodiscover()
def get_engine(engine_slug_):