mirror of https://github.com/interlegis/sigi.git
Sesóstris Vieira
6 months ago
2 changed files with 79 additions and 1 deletions
@ -0,0 +1,28 @@ |
|||
# Generated by Django 5.0.6 on 2024-06-19 12:49 |
|||
|
|||
from django.db import migrations |
|||
from django.db.models import Q |
|||
|
|||
|
|||
def ajusta_acts(apps, schema_editor): |
|||
Convenio = apps.get_model("convenios", "Convenio") |
|||
res = ( |
|||
Convenio.objects.filter(projeto__sigla="ACT", num_convenio="") |
|||
.filter( |
|||
Q(data_retorno_assinatura__isnull=False) |
|||
| Q(data_termino_vigencia__isnull=False) |
|||
) |
|||
.update(data_retorno_assinatura=None, data_termino_vigencia=None) |
|||
) |
|||
print(f"{res} convênios ajustados... ", end="") |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
("convenios", "0036_convenio_erro_gescon"), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RunPython(ajusta_acts, migrations.RunPython.noop), |
|||
] |
Loading…
Reference in new issue