diff --git a/app/Item.php b/app/Item.php index e5d243dfc..884f50aff 100644 --- a/app/Item.php +++ b/app/Item.php @@ -396,12 +396,12 @@ public function getAuthorsWithAuthoritiesAttribute() return $authorities->concat($authors); } - public function getUniqueAuthorsWithAuthorityNames() { return $this->authors_with_authorities ->pluck('name') - ->toArray(); + ->filter() + ->values(); } public function getFirstAuthorAttribute($value) diff --git a/tests/Models/ItemTest.php b/tests/Models/ItemTest.php index 9be998bc2..a66e4552e 100644 --- a/tests/Models/ItemTest.php +++ b/tests/Models/ItemTest.php @@ -147,7 +147,7 @@ public function testMergedAuthorityNamesAndAuthors() ]); $item = Item::factory()->make([ - 'author' => 'Philips Wouwerman; Vladimír Boudník', + 'author' => 'Philips Wouwerman; ; Vladimír Boudník', ]); $item->authorities()->attach($authority);