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