예제 #1
0
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))
예제 #2
0
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))
예제 #3
0
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))