# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-08-29 10:25
from __future__ import unicode_literals

from django.db import migrations

def update_issue_status(apps, update_data):
    status_arr = {'新增问题': "未处理", '问题处理中': "已处理", '问题关闭': "已关闭"}
    IssueStatus = apps.get_model('issue', 'issuestatus')
    for k, v in status_arr.items():
        IssueStatus.objects.filter(name=k).update(name=v)

class Migration(migrations.Migration):

    dependencies = [
        ('issue', '0004_auto_20170724_1759'),
    ]

    operations = [
        migrations.RunPython(update_issue_status)
    ]
