Skip to content

Commit

Permalink
[FINNA-2650] MARC: Avoid linking to deleted host records.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Oct 1, 2024
1 parent 2ef5408 commit eec2700
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/RecordManager/Base/Record/Marc.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ public function toSolrArray(Database $db = null)
[
'source_id' => $this->source,
'linking_id' => $linkingId,
'deleted' => false,
],
['projection' => ['_id' => 1]]
);
Expand All @@ -295,6 +296,7 @@ public function toSolrArray(Database $db = null)
[
'source_id' => $this->source,
'linking_id' => $targetId,
'deleted' => false,
],
['projection' => ['_id' => 1]]
);
Expand Down
3 changes: 3 additions & 0 deletions tests/RecordManagerTest/Base/Record/MarcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ public function testMarcLinking()
[
'source_id' => '__unit_test_no_source__',
'linking_id' => '(FI-NL)961827',
'deleted' => false,
],
[
'projection' => ['_id' => 1],
Expand All @@ -769,6 +770,7 @@ public function testMarcLinking()
[
'source_id' => '__unit_test_no_source__',
'linking_id' => '961827',
'deleted' => false,
],
[
'projection' => ['_id' => 1],
Expand All @@ -781,6 +783,7 @@ public function testMarcLinking()
[
'source_id' => '__unit_test_no_source__',
'linking_id' => '(FI-NL)xyzzy',
'deleted' => false,
],
[
'projection' => ['_id' => 1],
Expand Down

0 comments on commit eec2700

Please sign in to comment.