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.
23 lines
579 B
23 lines
579 B
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.20 on 2019-08-16 16:37
|
|
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', '0044_auto_20190816_1336'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(migra_ordenacao_tipos)
|
|
]
|
|
|