Skip to content

Commit

Permalink
Merge pull request #2504 from oat-sa/fix/AUT-3814/properties-without-…
Browse files Browse the repository at this point in the history
…range

Prevent Metadata exporter gather list from property without range
  • Loading branch information
bartlomiejmarszal authored Sep 23, 2024
2 parents eb97437 + cef7e63 commit 44abc70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion models/classes/metadata/metaMetadata/PropertyMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getMetadataProperties(Property $property): array

private function isIgnoredForCollectionGathering(Property $property): bool
{
return in_array($property->getUri(), $this->getIgnoredProperties());
return in_array($property->getUri(), $this->getIgnoredProperties()) || $property->getRange() === null;
}

private function getIgnoredProperties(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function testGetMetadataProperties(): void
$property = $this->createMock(Property::class);
$resourceMock = $this->createMock(Resource::class);
$property->method('getUri')->willReturn('uri');
$property->method('getRange')->willReturn('range');
$resourceMock->method('getUri')->willReturn('resource_uri');

$property
Expand Down

0 comments on commit 44abc70

Please sign in to comment.