From 9834bddae61117f082bb85a0537d819dc6548e5d Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 15 Nov 2019 13:12:20 -0500 Subject: [PATCH] Fix the alembic version returned if there is no active data migration --- conf/init/v3_migration.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/init/v3_migration.py b/conf/init/v3_migration.py index cb39450fc..89fe72770 100644 --- a/conf/init/v3_migration.py +++ b/conf/init/v3_migration.py @@ -10,6 +10,9 @@ else: elif v3_upgrade_mode == 'production-transition': print '481623ba00ba' elif v3_upgrade_mode == 'post-oci-rollout' or v3_upgrade_mode == 'post-oci-roll-back-compat' or v3_upgrade_mode == 'complete': - print ActiveDataMigration.alembic_migration_revision + if ActiveDataMigration is not None: + print ActiveDataMigration.alembic_migration_revision + else: + print 'head' else: raise Exception('Unknown V3_UPGRADE_MODE: %s' % v3_upgrade_mode)