From a2cf1405a93e99336f2cce122ead3f2d7b86da73 Mon Sep 17 00:00:00 2001 From: Damir Sultanbekov Date: Wed, 15 May 2024 14:50:03 +0500 Subject: [PATCH] Updated RandomAuthor service to filter person by Author role as well --- app/services/random_author.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/random_author.rb b/app/services/random_author.rb index d5ea1521..5e1fafc9 100644 --- a/app/services/random_author.rb +++ b/app/services/random_author.rb @@ -14,10 +14,12 @@ def call(genre = nil) join manifestations m on (m.expression_id = e.id) where ia.person_id = people.id + and ia.role = ? and m.status = ? and w.genre = coalesce(?, w.genre) ) SQL + InvolvedAuthority.roles[:author], Manifestation.statuses[:published], genre )