Fix error: get mab using customer and not email
This commit is contained in:
		
					parent
					
						
							
								8dfee2bd83
							
						
					
				
			
			
				commit
				
					
						a59cd86fee
					
				
			
		
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -84,7 +84,9 @@ class DashboardView(LoginRequiredMixin, View): | |||
|     def get(self, request, *args, **kwargs): | ||||
|         context = self.get_context_data() | ||||
|         try: | ||||
|             MonthlyHostingBill.objects.get(email=self.request.user.email) | ||||
|             MonthlyHostingBill.objects.get( | ||||
|                 customer=self.request.user.stripecustomer | ||||
|             ) | ||||
|             context['has_invoices'] = True | ||||
|         except MonthlyHostingBill.DoesNotExist as dne: | ||||
|             logger.error("{}'s monthly hosting bill not imported ?".format( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue