mirror of https://github.com/interlegis/sapl.git
Vinícius Cantuária
6 years ago
committed by
Cesar Carvalho
1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||
from sapl.materia.models import MateriaLegislativa |
|||
from sapl.protocoloadm.models import Protocolo |
|||
|
|||
|
|||
def main(): |
|||
for materia in MateriaLegislativa.objects.filter(numero_protocolo__isnull=False): |
|||
if not Protocolo.objects.filter(ano=materia.ano, numero=materia.numero_protocolo).exists(): |
|||
materia.numero_protocolo = None |
|||
materia.save() |
|||
|
|||
|
|||
if __name__ == '__main__': |
|||
main() |
Loading…
Reference in new issue