from apps.bi.models import Dataset


def correct_bi_test_param():
    dss = Dataset.objects.all()
    for ds in dss:
        if not ds.test_param and ds.default_param:
            ds.test_param = ds.default_param
            ds.default_param = {}
            ds.save()
