Skip to content

Commit

Permalink
Updated RandomAuthor service to filter person by Author role as well
Browse files Browse the repository at this point in the history
  • Loading branch information
damisul committed May 15, 2024
1 parent 4c8f4a2 commit a2cf140
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/services/random_author.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit a2cf140

Please sign in to comment.