[FIX] Contact form breaks on existing lead
When an email address from the contacts form is from a existing lead utils.py tries to set new_lead(an undefined var) as the lead reference if a lead is found.
This commit is contained in:
		
							parent
							
								
									5dfffe7586
								
							
						
					
					
						commit
						ac81440a81
					
				| @ -34,6 +34,8 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): | |||||||
| 
 | 
 | ||||||
| 	if customer: | 	if customer: | ||||||
| 		opportunity.customer = customer | 		opportunity.customer = customer | ||||||
|  | 	elif lead: | ||||||
|  | 		opportunity.lead = lead | ||||||
| 	else: | 	else: | ||||||
| 		opportunity.lead = new_lead.name | 		opportunity.lead = new_lead.name | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user