22 lines
564 B
Python
22 lines
564 B
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.2 on 2017-07-06 11:34
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def set_blank_to_null(apps, schema_editor):
|
|
for model_name in ('Area', 'Point', 'Level', 'Space', 'LocationGroup'):
|
|
model = apps.get_model('mapdata', model_name)
|
|
model.objects.filter(color='').update(color=None)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('mapdata', '0014_mapupdate'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(set_blank_to_null),
|
|
]
|