Avoid error if CORE has invalid products.tax FK
				
					
				
			This commit is contained in:
		
							parent
							
								
									dbeed929fc
								
							
						
					
					
						commit
						8929d678fa
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -310,10 +310,11 @@ class ProductImporter(FromCOREPOS, corepos_importing.model.ProductImporter): | |||
|             'regular_price_price': price, | ||||
|             'regular_price_multiple': 1 if price is not None else None, | ||||
|             'regular_price_type': self.enum.PRICE_TYPE_REGULAR if price is not None else None, | ||||
| 
 | ||||
|             'tax_code': str(product.tax_rate.id) if product.tax_rate_id else None, | ||||
|         } | ||||
| 
 | ||||
|         if 'tax_code' in self.fields: | ||||
|             data['tax_code'] = str(product.tax_rate.id) if product.tax_rate else None | ||||
| 
 | ||||
|         if self.fields_active(self.size_fields): | ||||
|             size_info = self.normalize_size_info(product) | ||||
|             data.update({ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar