Prevent error in old product search logic
when no POD image URL is configured
This commit is contained in:
		
							parent
							
								
									5f6b389556
								
							
						
					
					
						commit
						93bce57888
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1876,6 +1876,7 @@ class ProductView(MasterView):
 | 
			
		|||
        ])
 | 
			
		||||
 | 
			
		||||
    # TODO: deprecate / remove this?  not sure if/where it is used
 | 
			
		||||
    # (hm, still used by the old Instacart -> Configure page..)
 | 
			
		||||
    def search_v1(self):
 | 
			
		||||
        """
 | 
			
		||||
        Locate a product(s) by UPC.
 | 
			
		||||
| 
						 | 
				
			
			@ -1898,7 +1899,8 @@ class ProductView(MasterView):
 | 
			
		|||
                    'upc': str(product.upc),
 | 
			
		||||
                    'upc_pretty': product.upc.pretty(),
 | 
			
		||||
                    'full_description': product.full_description,
 | 
			
		||||
                    'image_url': pod.get_image_url(self.rattail_config, product.upc),
 | 
			
		||||
                    'image_url': pod.get_image_url(self.rattail_config, product.upc,
 | 
			
		||||
                                                   require=False),
 | 
			
		||||
                }
 | 
			
		||||
                uuid = self.request.GET.get('with_vendor_cost')
 | 
			
		||||
                if uuid:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue