Sistema de Informações Gerenciais do Interlegis
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
683 B

# Generated by Django 6.0.4 on 2026-08-07 15:18
from url_normalize import url_normalize
from django.contrib.postgres.operations import UnaccentExtension
from django.db import migrations
def mormaliza_urls(apps, schema_editor):
Servico = apps.get_model("servicos", "Servico")
for s in Servico.objects.filter(tipo_servico__modo="H").exclude(url=""):
s.url = url_normalize(s.url)
s.save()
class Migration(migrations.Migration):
dependencies = [
("servicos", "0023_remove_tiposervico_arquivo_rancher_and_more"),
]
operations = [
UnaccentExtension(),
migrations.RunPython(mormaliza_urls, migrations.RunPython.noop),
]