Merge remote-tracking branch 'origin/dev' into newGroupNode

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-09 10:48:35 -03:00
commit 44bebf7d6b
4 changed files with 15 additions and 5 deletions

View file

@ -32,7 +32,11 @@ def initialize_database():
try:
database_service.run_migrations()
except CommandError as exc:
if "Can't locate revision identified by" not in str(exc):
# if "overlaps with other requested revisions" or "Can't locate revision identified by"
# are not in the exception, we can't handle it
if "overlaps with other requested revisions" not in str(
exc
) and "Can't locate revision identified by" not in str(exc):
raise exc
# This means there's wrong revision in the DB
# We need to delete the alembic_version table