add db to repo
This commit is contained in:
		
							parent
							
								
									f2fc2362a7
								
							
						
					
					
						commit
						9b3973805e
					
				
					 7 changed files with 97 additions and 55 deletions
				
			
		| 
						 | 
				
			
			@ -45,7 +45,7 @@ def _render_template(template: CertificateTemplate, instance: ProcessInstance):
 | 
			
		|||
@login_required
 | 
			
		||||
def certificate_step(request, instance_id, step_id):
 | 
			
		||||
    instance = get_object_or_404(ProcessInstance, id=instance_id)
 | 
			
		||||
 | 
			
		||||
    step = get_object_or_404(instance.process.steps, id=step_id)
 | 
			
		||||
    # Ensure all previous steps are completed and invoice settled
 | 
			
		||||
    prior_steps = instance.process.steps.filter(order__lt=instance.current_step.order if instance.current_step else 9999)
 | 
			
		||||
    incomplete = StepInstance.objects.filter(process_instance=instance, step__in=prior_steps).exclude(status='completed').exists()
 | 
			
		||||
| 
						 | 
				
			
			@ -97,6 +97,7 @@ def certificate_step(request, instance_id, step_id):
 | 
			
		|||
        'cert': cert,
 | 
			
		||||
        'previous_step': previous_step,
 | 
			
		||||
        'next_step': next_step,
 | 
			
		||||
        'step': step,
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue