mirror of
https://github.com/ansible/awx.git
synced 2026-02-13 17:24:45 -03:30
Merge pull request #570 from wwitzel3/release_3.2.2
Handle ProgrammingError in squashed helpers
This commit is contained in:
@@ -3,6 +3,7 @@ from django.db import (
|
|||||||
connection,
|
connection,
|
||||||
migrations,
|
migrations,
|
||||||
OperationalError,
|
OperationalError,
|
||||||
|
ProgrammingError,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ def current_migration(exclude_squashed=True):
|
|||||||
if exclude_squashed:
|
if exclude_squashed:
|
||||||
migration_qs = migration_qs.exclude(name__contains='squashed')
|
migration_qs = migration_qs.exclude(name__contains='squashed')
|
||||||
return migration_qs.latest('id')
|
return migration_qs.latest('id')
|
||||||
except (recorder.Migration.DoesNotExist, OperationalError):
|
except (recorder.Migration.DoesNotExist, OperationalError, ProgrammingError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user