<commit_before>from django.db import migrations


def migrate_reviewers(apps, schema_editor):
    """Migrate reviewers from projects to assignees"""
    Project = apps.get_model("projects", "Project")
    ProjectAssignee = apps.get_model("projects", "ProjectAssignee")
    projects = Project.objects.all()

    for project in projects:
        for reviewer in project.reviewers.all():
            project_assignee = ProjectAssignee(
                user=reviewer, project=project, is_reviewer=True
            )
            project_assignee.save()


class Migration(migrations.Migration):

    dependencies = [
        ("projects", "0011_auto_20210419_1459"),
    ]

    operations = [
        migrations.RunPython(migrate_reviewers),
    ]<commit_msg>fix(projects): add manager role to project assignees<commit_after>from django.db import migrations


def migrate_reviewers(apps, schema_editor):
    """Migrate reviewers from projects to assignees"""
    Project = apps.get_model("projects", "Project")
    ProjectAssignee = apps.get_model("projects", "ProjectAssignee")
    projects = Project.objects.all()

    for project in projects:
        for reviewer in project.reviewers.all():
            project_assignee = ProjectAssignee(
                user=reviewer, project=project, is_reviewer=True, is_manager=True
            )
            project_assignee.save()


class Migration(migrations.Migration):

    dependencies = [
        ("projects", "0011_auto_20210419_1459"),
    ]

    operations = [
        migrations.RunPython(migrate_reviewers),
    ]
{'fraction_non_alphanumeric': 0.10064102564102564, 'fraction_numerical': 0.020512820512820513, 'mean_word_length': 3.218918918918919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4332648', 'n_tokens_mistral': 472, 'n_tokens_neox': 427, 'n_words': 91}