remove unecessary code

already done by ::createProductCombination
This commit is contained in:
Cédric 2019-11-23 16:08:35 +01:00 committed by GitHub
parent 76fd794559
commit 6484ba10c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1372,8 +1372,6 @@ class Products extends DolibarrApi
} }
$prodcomb = new ProductCombination($this->db); $prodcomb = new ProductCombination($this->db);
if (! $prodcomb->fetchByProductCombination2ValuePairs($id, $features))
{
$result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact, $reference); $result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact, $reference);
if ($result > 0) if ($result > 0)
{ {
@ -1381,9 +1379,6 @@ class Products extends DolibarrApi
} else { } else {
throw new RestException(500, "Error creating new product variant"); throw new RestException(500, "Error creating new product variant");
} }
} else {
return $prodcomb->id;
}
} }
/** /**