Skip to content

Commit

Permalink
Remove unwanted shop id check in media by id getter
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Feb 5, 2024
1 parent e28afb1 commit 6ac3c5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Media/Repository/MediaRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ public function getMediaById(string $mediaId): MediaInterface
{
$result = $this->connection->executeQuery(
$this->getMediaSelectSqlPart()
. "WHERE m.OXSHOPID = :OXSHOPID AND m.OXID = :OXID",
. "WHERE m.OXID = :OXID",
[
'OXSHOPID' => $this->basicContext->getCurrentShopId(),
'OXID' => $mediaId
]
);
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Media/Repository/MediaRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function testRenameMedia(): void
$queryBuilder = $this->getAddItemQueryBuilder();
$queryBuilder->setParameters([
'OXID' => $mediaIdToRename,
'OXSHOPID' => 1,
'OXSHOPID' => 2,
'DDFILENAME' => 'OriginalName',
'DDFILESIZE' => 0,
'DDFILETYPE' => 'any',
Expand Down

0 comments on commit 6ac3c5f

Please sign in to comment.