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 dashboard/my/collections when default admin set table doesn’t exist #5328

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Jan 20, 2022

Description

A bug caused the missing table to be checked even after determining that saving the default admin set id wasn’t supported. It is supposed to be ok for the table to be missing for backward compatibility.

image

Solution

The primary cause of the bug was that a return was missing in the method that determines the default admin set id. It was supposed to return the DEFAULT_ID after determining that saving the id was not supported because the table was missing.

Adding the return of the DEFAULT_ID when saving is not supported fixed the first problem and revealed a second problem where after not finding an admin set with the DEFAULT_ID, it was throwing an exception. It is not ok for an admin set not to exist with the saved admin set id, but it is ok for an admin set with the DEFAULT_ID not to exist. When this happens, the default admin set will be created with id=DEFAULT_ID. This missing object exception is now ignored when the id==DEFAULT_ID.

@samvera/hyrax-code-reviewers

@elrayle elrayle force-pushed the bc_default_adminset branch 2 times, most recently from fb6db6d to aabebb0 Compare January 20, 2022 17:44
A bug caused the missing table to be checked even after determining that saving the default admin set id wasn’t supported.  Added a failing test and fixed the bug.
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@elrayle elrayle merged commit a728375 into main Jan 21, 2022
@elrayle elrayle deleted the bc_default_adminset branch January 21, 2022 21:07
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