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

Merge pull request #1698 from AlanCoding/transactions_gone_crazy

do not check for migration version if not migrating
This commit is contained in:
Alan Rominger 2018-05-07 11:06:05 -04:00 committed by GitHub
commit f4aaabaae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ def _log_database_error():
try:
yield
except (ProgrammingError, OperationalError) as e:
if get_tower_migration_version() < '310':
if 'migrate' in sys.argv and get_tower_migration_version() < '310':
logger.info('Using default settings until version 3.1 migration.')
else:
logger.warning('Database settings are not available, using defaults (%s)', e, exc_info=True)