Skip to content

Commit

Permalink
Fix problem with empty ean field on offer create form (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrzyzewski authored Mar 3, 2020
1 parent fc926b6 commit 8b1fa85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Model/Data/Offer.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ public function getRawData(): array
],
'product' => null,
'parameters' => $this->mapParameters($this->getParameters()),
'ean' => $this->getEan(),
'description' => [
'sections' => [
0 => [
Expand Down Expand Up @@ -463,6 +462,10 @@ public function getRawData(): array
'afterSalesServices' => $this->mapAfterSalesServices($this->getAfterSalesServices())
];

if ($this->getEan() != '') {
$rawData['ean'] = $this->getEan();
}

return $rawData;
}

Expand Down

0 comments on commit 8b1fa85

Please sign in to comment.