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

Fix broken GET submission endpoint #1151

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Fix broken GET submission endpoint #1151

merged 2 commits into from
Feb 22, 2024

Conversation

naglepuff
Copy link
Collaborator

@naglepuff naglepuff commented Feb 22, 2024

Partial Fix #1150

Fix #1148

Using ** to pass kwargs proved to be unreliable, resulting in an inability to open submissions on the submission portal.

To reproduce the issue locally I restored the most recent backup from NERSC CFS and ran

docker-compose pull
docker-compose up

Logged in as an admin user, I was unable to open any submissions until applying the changes.

While testing, I noticed a bug that would wipe out submission roles on migration. In order to stop this, SubmissionRole is now carried over in the same way that UserLogins and SubmissionMetadatas are. In order to fully fix that issue, I would propose re-running the migration. Or performing the query:

insert into submission_role
select id, author_orcid, 'owner'::submissioneditorrole from submission_metadata;

in dev, since recent migrations have already wiped out that table.

This doesn't work. Instead, pass in the required parameters to the front end explicitly.
@naglepuff naglepuff changed the title Don't use ** to convert row to dict Fix broken GET submission endpoint Feb 22, 2024
@naglepuff naglepuff merged commit b44467f into main Feb 22, 2024
2 checks passed
@naglepuff naglepuff deleted the 1148-get-submission-fix branch February 22, 2024 17:59
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.

Submission owner roles missing in dev Unable to open submission
3 participants