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.
		
		
		
		
		
			
		
			
				
					
					
						
							13 lines
						
					
					
						
							409 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							13 lines
						
					
					
						
							409 B
						
					
					
				| 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()
 | |
| 
 |