mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
746 B
27 lines
746 B
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.9.13 on 2018-03-19 13:41
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
def adjust_bug_auto_inserido(apps, schema_editor):
|
|
Dispositivo = apps.get_model('compilacao', 'Dispositivo')
|
|
|
|
Dispositivo.objects.filter(
|
|
tipo_dispositivo__class_css__startswith='caput',
|
|
dispositivo_pai__tipo_dispositivo__class_css__startswith='artigo',
|
|
auto_inserido=False
|
|
).update(auto_inserido=True)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('compilacao', '0011_tipotextoarticulado_rodape_global'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(adjust_bug_auto_inserido),
|
|
]
|
|
|