def change_label_of_state(apps, schema_editor):
    """
    Changes the label of former state "commited a bill" to "refered to committee".
    """
    State = apps.get_model('motions', 'State')
    try:
        state = State.objects.get(name='commited a bill')
    except State.DoesNotExist:
        pass
    else:
        state.name = 'refered to committee'
        state.action_word = 'Refer to committee'
        state.save(skip_autoupdate=True)
