def post_run_create(sender, instance, raw, **kwargs):
    """
    Post action after creating a run instance.

    This will make sure the ``schedule_id`` field is set.

    """
    if not instance.schedule_id:
        instance.schedule_id = instance.id
        instance.save()
