Catch/display error when exporting QB invoices
don't let it raise to email alert
This commit is contained in:
		
							parent
							
								
									816874cc84
								
							
						
					
					
						commit
						18419fc861
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -411,7 +411,16 @@ class ExportableInvoiceView(MasterView):
 | 
			
		|||
            return self.redirect(self.get_index_url())
 | 
			
		||||
 | 
			
		||||
        # perform actual export and capture result
 | 
			
		||||
        result = self.do_export(invoices)
 | 
			
		||||
        try:
 | 
			
		||||
            result = self.do_export(invoices)
 | 
			
		||||
 | 
			
		||||
        except Exception as error:
 | 
			
		||||
            log.warning("failed to export invoices: %s",
 | 
			
		||||
                        [inv.uuid for inv in invoices],
 | 
			
		||||
                        exc_info=True)
 | 
			
		||||
            self.request.session.flash(simple_error(error), 'error')
 | 
			
		||||
            return self.redirect(self.request.get_referrer(
 | 
			
		||||
                default=self.get_index_url()))
 | 
			
		||||
 | 
			
		||||
        # clear out current checkbox selection
 | 
			
		||||
        self.set_selected(set())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue