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.
24 lines
584 B
24 lines
584 B
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.20 on 2019-08-09 16:19
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def migra_ordenacao_tipos(apps, schema_editor):
|
|
TipoExpediente = apps.get_model('sessao', 'TipoExpediente')
|
|
|
|
for i,tipo in enumerate(TipoExpediente.objects.all().order_by('nome')):
|
|
tipo.ordenacao=i+1
|
|
tipo.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('sessao', '0045_auto_20190809_1319'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(migra_ordenacao_tipos)
|
|
]
|
|
|