mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-10 02:47:49 +00:00
Except IntegrityError
- This error may be thrown if the correct migrations have not been applied
This commit is contained in:
1 parent
85ac1bfb95
commit
4193d2e7fe
1 file changed
+3
-3
@@ -1,5 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
from django.db.utils import OperationalError, ProgrammingError, IntegrityError
|
||||
|
||||
|
||||
class CommonConfig(AppConfig):
|
||||
@@ -48,7 +48,7 @@ class CommonConfig(AppConfig):
|
||||
value=instance_name
|
||||
)
|
||||
|
||||
except (OperationalError, ProgrammingError):
|
||||
except (OperationalError, ProgrammingError, IntegrityError):
|
||||
# Migrations have not yet been applied - table does not exist
|
||||
pass
|
||||
|
||||
@@ -87,6 +87,6 @@ class CommonConfig(AppConfig):
|
||||
setting.key = key
|
||||
setting.save()
|
||||
|
||||
except (OperationalError, ProgrammingError):
|
||||
except (OperationalError, ProgrammingError, IntegrityError):
|
||||
# Table might not yet exist
|
||||
pass
|
||||
Reference in new issue
Block a user