# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-11-22 14:14
from __future__ import unicode_literals

from django.db import migrations



def update_widget_names(apps, schema_editor):
    AbstractWidget = apps.get_model("workflows", "AbstractWidget")

    for aw in AbstractWidget.objects.all():
        if aw.name.endswith(" nltoolkit"):
            aw.name=aw.name[:-len(" nltoolkit")]
        elif aw.name.endswith(" latino"):
            aw.name=aw.name[:-len(" latino")]
        elif aw.name.endswith(" lemmagen"):
            aw.name=aw.name[:-len(" lemmagen")]
        elif aw.name.endswith(" literature_based_discovery"):
            aw.name=aw.name[:-len(" literature_based_discovery")]

        aw.save()

class Migration(migrations.Migration):

    dependencies = [
        ('workflows', '0003_auto_20161111_1332'),
    ]

    operations = [
        migrations.RunPython(update_widget_names),

    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-11-22 14:14
from __future__ import unicode_literals

from django.db import migrations



def update_widget_names(apps, schema_editor):
    AbstractWidget = apps.get_model("workflows", "AbstractWidget")

    for aw in AbstractWidget.objects.all():
        if aw.name.endswith(" nltoolkit"):
            aw.name=aw.name[:-len(" nltoolkit")]
        elif aw.name.endswith(" latino"):
            aw.name=aw.name[:-len(" latino")]
        elif aw.name.endswith(" lemmagen"):
            aw.name=aw.name[:-len(" lemmagen")]
        elif aw.name.endswith(" literature_based_discovery"):
            aw.name=aw.name[:-len(" literature_based_discovery")]

        aw.save()

class Migration(migrations.Migration):

    dependencies = [
        ('workflows', '0003_auto_20161111_1332'),
    ]

    operations = [
        migrations.RunPython(update_widget_names),

    ]

# -*- coding: utf-8 -*- # Generated by Django 1.9.10 on 2016-11-22 14:14