2
0
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:
Oliver 2020-10-20 20:35:59 +11:00 committed by GitHub
commit bc6f58cf26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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