def create_metric_set(name=None, metrics=None, email_recipients=None,
        no_email=False, send_daily=True, send_weekly=False,
        send_monthly=False):

    # This should be a NOOP for the non-database-backed backends
    if not should_create_models():
        return

    try:
        metric_set = MetricSet(
                            name=name,
                            no_email=no_email,
                            send_daily=send_daily,
                            send_weekly=send_weekly,
                            send_monthly=send_monthly)
        metric_set.save()

        for m in metrics:
            metric_set.metrics.add(m)

        for e in email_recipients:
            metric_set.email_recipients.add(e)

    except:
        return False

    return metric_set
A formset over a ForeignKey with a to_field can be saved. Regression for #11120
dataset/ETHPy150Open frankwiles/django-app-metrics/app_metrics/utils.py/create_metric_set--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/model_formsets_regress/tests.py/InlineFormsetTests.test_formset_over_inherited_model