Skip to content

Commit a968655

Browse files
committed
[SHARE- ][Fix] Only include affiliations of people
1 parent 6f07f09 commit a968655

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bots/elasticsearch/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def fetch_creativework(pks):
160160
FROM share_agentrelation AS affiliation
161161
JOIN share_agent AS affiliated_agent ON affiliation.related_id = affiliated_agent.id
162162
WHERE affiliation.subject_id = agent.id AND affiliated_agent.type != 'share.person'
163-
) AS affiliations ON TRUE
163+
) AS affiliations ON (agent.type = 'share.person')
164164
LEFT JOIN LATERAL (
165165
SELECT json_agg(json_strip_nulls(json_build_object(
166166
'id', award.id

0 commit comments

Comments
 (0)