Save billing address only if billing_address exists
This commit is contained in:
		
					parent
					
						
							
								0d27bac3a8
							
						
					
				
			
			
				commit
				
					
						f4e84f62a4
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -663,7 +663,8 @@ class SettingsView(LoginRequiredMixin, FormView): | |||
|                             extra_tags='error' | ||||
|                         ) | ||||
|                         billing_address = current_billing_address | ||||
|                         billing_address.save() | ||||
|                         if billing_address: | ||||
|                             billing_address.save() | ||||
|                         email_data = { | ||||
|                             'subject': "%s updated VAT number to %s but failed" % | ||||
|                                        (request.user.email, vat_number), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue