Browse Source
			
			
			Merge pull request #1942 from interlegis/1941-verificacao-de-existencia-de-numero
			
				Fix #1941
			
			
				pull/1943/head
			
			
		 
		
			
				
					
						 Victor Fabre
					
					8 years ago
						Victor Fabre
					
					8 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
5 additions and 
4 deletions
			 
			
		 
		
			
				- 
					
					
					 
					sapl/protocoloadm/views.py
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -451,6 +451,7 @@ class ProtocoloMateriaView(PermissionRequiredMixin, CreateView): | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if not protocolo.numero: | 
			
		
	
		
			
				
					|  |  |  |             protocolo.numero = (numero['numero__max'] + 1) if numero['numero__max'] else 1 | 
			
		
	
		
			
				
					|  |  |  |         if numero['numero__max']: | 
			
		
	
		
			
				
					|  |  |  |             if protocolo.numero < (numero['numero__max'] + 1): | 
			
		
	
		
			
				
					|  |  |  |                 msg = _('Número de protocolo deve ser maior que {}').format(numero['numero__max']) | 
			
		
	
		
			
				
					|  |  |  |                 messages.add_message(self.request, messages.ERROR, msg) | 
			
		
	
	
		
			
				
					|  |  | 
 |