Skip to content

Commit

Permalink
Category bugfix (#231)
Browse files Browse the repository at this point in the history
* force category position to integer

* remove greater than check
  • Loading branch information
jochenmanz authored Sep 25, 2017
1 parent 86f7218 commit 6f685f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function parse(array $entry)
'parentIdentifier' => $parentCategoryIdentifier,
'shopIdentifiers' => $shopIdentifiers,
'imageIdentifiers' => $this->getImages($validDetails['0'], $result),
'position' => $validDetails['0']['position'],
'position' => (int) $validDetails['0']['position'],
'description' => $validDetails['0']['shortDescription'],
'longDescription' => $validDetails['0']['description'],
'metaTitle' => $validDetails['0']['metaTitle'],
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.0.5]
### Fixed
- force category position to integer

## [4.0.4]
### Added
- prepayment is now mapped correctly
Expand Down
1 change: 0 additions & 1 deletion Connector/Validator/Category/CategoryValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function validate($object)
Assertion::allUuid($object->getImageIdentifiers(), null, 'category.imageIdentifiers');

Assertion::integer($object->getPosition(), null, 'category.position');
Assertion::greaterOrEqualThan($object->getPosition(), 0, null, 'category.position');

Assertion::string($object->getDescription(), null, 'category.description');
Assertion::string($object->getLongDescription(), null, 'category.longDescription');
Expand Down

0 comments on commit 6f685f5

Please sign in to comment.