mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1061 from SchrodingersGat/migration-fix
Except IntegrityError
This commit is contained in:
commit
bc6f58cf26
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user