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

Make approval of imported entities work #319

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

kellnerd
Copy link
Contributor

@kellnerd kellnerd commented Jul 15, 2024

Problem

Approving imported entities currently fails on metabrainz/bookbrainz-site@6684575

Solution

Areas of Impact

Only import related ORM functions are affected this time.
Doing an npm an release is not required yet, there will be more changes soon and I am using a local version of the ORM package anyway.

Not sure whether that is the best solution with Bookshelf.js, but this
prevents the following SQL error from crashing the server:

> error: insert into "bookbrainz"."author" ("alias_set_id", "begin_area_id", "begin_day", "begin_month", "begin_year", "disambiguation_id", "end_area_id", "end_day", "end_month", "end_year", "ended", "gender_id", "identifier_set_id", "revision_id", "type_id") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) returning * - null value in column "bbid" violates not-null constraint
We need it again to update the search index.
Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahaaa, that's where that function was supposed to be used!
Also explains why I never ran into it myself.

Changes look good, nice job on working out the issues

@MonkeyDo MonkeyDo merged commit 98f6ade into metabrainz:master Jul 17, 2024
2 checks passed
@kellnerd kellnerd deleted the approve-import branch July 17, 2024 09:26
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.

2 participants