mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +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.apps import AppConfig
|
||||||
from django.db.utils import OperationalError, ProgrammingError
|
from django.db.utils import OperationalError, ProgrammingError, IntegrityError
|
||||||
|
|
||||||
|
|
||||||
class CommonConfig(AppConfig):
|
class CommonConfig(AppConfig):
|
||||||
@ -48,7 +48,7 @@ class CommonConfig(AppConfig):
|
|||||||
value=instance_name
|
value=instance_name
|
||||||
)
|
)
|
||||||
|
|
||||||
except (OperationalError, ProgrammingError):
|
except (OperationalError, ProgrammingError, IntegrityError):
|
||||||
# Migrations have not yet been applied - table does not exist
|
# Migrations have not yet been applied - table does not exist
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -87,6 +87,6 @@ class CommonConfig(AppConfig):
|
|||||||
setting.key = key
|
setting.key = key
|
||||||
setting.save()
|
setting.save()
|
||||||
|
|
||||||
except (OperationalError, ProgrammingError):
|
except (OperationalError, ProgrammingError, IntegrityError):
|
||||||
# Table might not yet exist
|
# Table might not yet exist
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user