mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Catch a ProgrammingError if table does not exist
This commit is contained in:
parent
f03f6c4386
commit
066d69215f
@ -1,5 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
from django.db.utils import OperationalError
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
|
||||
import os
|
||||
|
||||
@ -43,6 +43,6 @@ class CommonConfig(AppConfig):
|
||||
setting.save()
|
||||
|
||||
print("Creating new key: '{k}' = '{v}'".format(k=key, v=default))
|
||||
except OperationalError:
|
||||
except (OperationalError, ProgrammingError):
|
||||
# Migrations have not yet been applied - table does not exist
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user