From 4a39dc8463fc8fceb9da48ba0568afc0b92d7362 Mon Sep 17 00:00:00 2001 From: Payten Giles Date: Fri, 16 Oct 2020 10:35:45 +1100 Subject: [PATCH] Fix Sequel query to match both creator an subject --- backend/model/ladybird_export.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/model/ladybird_export.rb b/backend/model/ladybird_export.rb index 16ae047..d1b2549 100644 --- a/backend/model/ladybird_export.rb +++ b/backend/model/ladybird_export.rb @@ -388,7 +388,7 @@ def prepare_related_agents .and(Sequel.|({:name_corporate_entity__is_display_name => 1}, {:name_corporate_entity__is_display_name => nil})) .and(Sequel.|({:name_family__is_display_name => 1}, {:name_family__is_display_name => nil})) .and(Sequel.|({:name_software__is_display_name => 1}, {:name_software__is_display_name => nil})) - .and(Sequel.|({:linked_agents_rlshp__role_id => creator_enum_id, :linked_agents_rlshp__role_id => subject_enum_id})) + .and(Sequel.|({:linked_agents_rlshp__role_id => [creator_enum_id, subject_enum_id]})) .select(Sequel.as(:archival_object__id, :archival_object_id), Sequel.as(:linked_agents_rlshp__role_id, :role_id), Sequel.as(:name_person__sort_name, :person),