# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-25 19:51
from __future__ import unicode_literals

from django.db import migrations


from pootle.core.user import get_system_user_id


def remove_system_scorelogs(apps, schema_editor):
    scorelogs = apps.get_model("pootle_statistics.ScoreLog").objects.all()
    scorelogs.filter(user_id=get_system_user_id()).delete()


class Migration(migrations.Migration):

    dependencies = [
        ('pootle_statistics', '0014_truncate_source_subs'),
    ]

    operations = [
        migrations.RunPython(remove_system_scorelogs),
    ]
