fixed app hook fix_tree

This commit is contained in:
vabene1111 2021-10-11 16:51:41 +02:00
parent 7aafd9829d
commit 9f1351c84a

View File

@ -1,6 +1,6 @@
from django.apps import AppConfig
from django.conf import settings
from django.db import OperationalError
from django.db import OperationalError, ProgrammingError
from django_scopes import scopes_disabled
@ -22,3 +22,5 @@ class CookbookConfig(AppConfig):
Food.fix_tree(fix_paths=True)
except OperationalError:
pass # if model does not exist there is no need to fix it
except ProgrammingError:
pass # if migration has not been run database cannot be fixed yet