mirror of https://github.com/interlegis/sigi.git
Sesostris Vieira
2 years ago
5 changed files with 155 additions and 31 deletions
@ -0,0 +1,28 @@ |
|||
# Generated by Django 4.1.4 on 2023-01-24 14:51 |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
("servicos", "0020_servico_apps"), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RemoveConstraint( |
|||
model_name="servico", |
|||
name="unique_instance", |
|||
), |
|||
migrations.AddConstraint( |
|||
model_name="servico", |
|||
constraint=models.UniqueConstraint( |
|||
condition=models.Q( |
|||
("data_desativacao", None), |
|||
models.Q(("instancia", ""), _negated=True), |
|||
), |
|||
fields=("tipo_servico", "instancia", "url"), |
|||
name="unique_instance", |
|||
), |
|||
), |
|||
] |
@ -0,0 +1,34 @@ |
|||
# Generated by Django 4.1.5 on 2023-01-25 14:40 |
|||
|
|||
from django.db import migrations |
|||
|
|||
|
|||
def mailleg_fw(apps, schema_editor): |
|||
TipoServico = apps.get_model("servicos", "TipoServico") |
|||
tipo = TipoServico.objects.get(sigla__icontains="mail") |
|||
tipo.tipo_rancher = "emailleg" |
|||
tipo.arquivo_rancher = "mail.json" |
|||
tipo.spec_rancher = "mail" |
|||
tipo.prefixo_padrao = "correioadm" |
|||
tipo.save() |
|||
|
|||
|
|||
def mailleg_rw(apps, schema_editor): |
|||
TipoServico = apps.get_model("servicos", "TipoServico") |
|||
tipo = TipoServico.objects.get(sigla__icontains="mail") |
|||
tipo.tipo_rancher = "" |
|||
tipo.arquivo_rancher = "" |
|||
tipo.spec_rancher = "" |
|||
tipo.prefixo_padrao = "" |
|||
tipo.save() |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
("servicos", "0021_remove_servico_unique_instance_and_more"), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RunPython(mailleg_fw, mailleg_rw), |
|||
] |
@ -0,0 +1,16 @@ |
|||
{% extends 'emails/base_email.rst' %} |
|||
{% load i18n %} |
|||
|
|||
{% block content %} |
|||
{% blocktrans %}UM ERRO OCORREU NO PROCESSO DE IMPORTAÇÃO DE {{ process_name }}{% endblocktrans %} |
|||
|
|||
{% trans "VERIFIQUE O LOG DO SIGI PARA MAIORES DETALHES" %} |
|||
|
|||
* {% trans "Data/hora de execução" %}: {% now 'SHORT_DATETIME_FORMAT' %} |
|||
|
|||
::{% autoescape off %}{% for error_row in traceback %} |
|||
{{ error_row }} |
|||
{% endfor %} |
|||
{% endautoescape %} |
|||
|
|||
{% endblock content %} |
Loading…
Reference in new issue