def assert_messaging_migration_complete(info): migrations_have_not_run = any( [not MigrationStatus.has_migration_completed(name) for name in info.migration_names] ) is_fresh_install = os.environ.get('CCHQ_IS_FRESH_INSTALL') == '1' if migrations_have_not_run and not (settings.UNIT_TESTING or is_fresh_install): raise MigrationException(EXCEPTION_MESSAGE.render(info.context))
def assert_messaging_migration_complete(info): migrations_have_not_run = any( [not MigrationStatus.has_migration_completed(name) for name in info.migration_names] ) is_fresh_install = os.environ.get('CCHQ_IS_FRESH_INSTALL') == '1' if migrations_have_not_run and not (settings.UNIT_TESTING or is_fresh_install): raise MigrationException(EXCEPTION_MESSAGE.render(info.context))
def assert_messaging_migration_complete(info): migrations_have_not_run = any([ not MigrationStatus.has_migration_completed(name) for name in info.migration_names ]) if migrations_have_not_run: raise MigrationException(EXCEPTION_MESSAGE.render(info.context))