Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(api): return distinct publishers #203

Open
wants to merge 1 commit into
base: deploy
Choose a base branch
from

Conversation

koeaw
Copy link
Collaborator

@koeaw koeaw commented Sep 23, 2024

Return distinct() expression_publishers to fix
errors resulting from duplicate relations set
between Expressions and Organisations + remove
current workaround of slicing returned publishers.

Return distinct() expression_publishers to fix
errors resulting from duplicate relations set
between Expressions and Organisations + remove
current workaround of slicing returned publishers.
@koeaw
Copy link
Collaborator Author

koeaw commented Sep 23, 2024

@sennierer As said on MM, I believe I've identified a(n accidental) duplication of the publisher relation between an Expression and Organisation as the problem which caused the error with too many publishers being returned.

This would filter out the same weirdness should it happen again – instead of slicing the publishers. Given we don't think there is/should/can be more than one publisher per Expression.

@koeaw
Copy link
Collaborator Author

koeaw commented Sep 23, 2024

The offending Expression entity is 26373, which is related to/caused errors for Works 19724 and 26613 when those were queried via the API.

ETA: One Work appears to be part of the other, based on their titles/descriptions. Which, IIRC, should result in "is realised in" relations to two distinct Expressions (one for each) and a link between the two Expressions ("expression is part of expression"/"expression has part expression").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant