From 7c8b34beb12057a5b6a2f1647905e498211bd63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Cantu=C3=A1ria?= Date: Mon, 27 May 2019 16:05:59 -0300 Subject: [PATCH] =?UTF-8?q?Cria=20migra=C3=A7=C3=A3o=20para=20aplicar=20va?= =?UTF-8?q?lores=20v=C3=A1lidos=20e=20=C3=BAnicos=20(#2813)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2807 --- .../migrations/0040_auto_20190523_1130.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sapl/sessao/migrations/0040_auto_20190523_1130.py diff --git a/sapl/sessao/migrations/0040_auto_20190523_1130.py b/sapl/sessao/migrations/0040_auto_20190523_1130.py new file mode 100644 index 000000000..74de803e9 --- /dev/null +++ b/sapl/sessao/migrations/0040_auto_20190523_1130.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-05-23 14:30 +from __future__ import unicode_literals + +from django.db import migrations + + +def unifica_opcaoes_ordenacao_resumo(apps, schema_editor): + ResumoOrdenacao = apps.get_model('sessao', 'ResumoOrdenacao') + ro = ResumoOrdenacao.objects.get_or_create()[0] + if 'oradores_o_d' not in ro.__dict__: + ro.decimo_quarto = 'oradores_o_d' + ro.save() + + +class Migration(migrations.Migration): + dependencies = [ + ('sessao', '0039_auto_20190430_0825'), + ] + + operations = [ + migrations.RunPython(unifica_opcaoes_ordenacao_resumo) + ]