1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Handle ProgrammingError in squashed helpers

This commit is contained in:
Wayne Witzel III 2017-11-03 10:34:25 -04:00
parent d7f4707044
commit 1a5b5c32b8
No known key found for this signature in database
GPG Key ID: B4F07BDC564D6301

View File

@ -3,6 +3,7 @@ from django.db import (
connection,
migrations,
OperationalError,
ProgrammingError,
)
@ -30,7 +31,7 @@ def current_migration(exclude_squashed=True):
if exclude_squashed:
migration_qs = migration_qs.exclude(name__contains='squashed')
return migration_qs.latest('id')
except (recorder.Migration.DoesNotExist, OperationalError):
except (recorder.Migration.DoesNotExist, OperationalError, ProgrammingError):
return None