-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
return unless @work.is_a? FileSet | ||
return @work if @work.is_a? FileSet | ||
|
||
filesets = @work.members.select { |m| m.is_a? FileSet } | ||
filesets.empty? ? nil : filesets[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're doing an empty return if @work
is anything other than a file set....then we're returning @work
if it is a file set....how do we get to lines 13-14?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! This was left over from the old Newspaper gem logic, as I'm looking at it now, I'm not sure why it would have worked since if @work
comes in as something that is NOT a FileSet, then we'd get a type mismatch error like we're seeing. If it came in as a string then we find it's FileSet and if it does come in as a FileSet then it just returns it. So I'm not sure why you would call #members
on a FileSet to look for more FileSets. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the code you linked above, we would get to the code on your lines 13-14 in the instance that @work
was a Work model.
however, in the code changes you have right now, you are returning from the method if @work
is a Work model. so the code on 13-14 doesn't apply. if the intention is to get the file sets on a work, then I think line 10 needs to be removed.
in that case, we return the FileSet if that was passed in, or we find the FileSet if a Work was passed in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the intention is the get the FileSet, i have the IIIF Print PR you looked at that addresses this at a higher level so actually i'm going to close this one and update IIIF Print instead, thanks for taking a look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, going to keep this PR opened and push another commit to update IIIF Print, might as well keep it in one instead of splitting it into two
closing this PR in favor of this change in IIIF Print notch8/iiif_print#253 next step is to update IIIF Print in this repo |
On second thought I can just use this same PR since it's all filled out and add a different commit |
This commit will add the feature of persisting the search from the catalog to the UV. This will make it better for the user so they don't have to search the same term again. This will also update IIIF Print to the latest revision. Ref: - https://github.com/scientist-softserv/adventist-dl/issues/470
d447dd8
to
d9658e8
Compare
Story
This commit will add the feature of persisting the search from the catalog to the UV. This will make it better for the user so they don't have to search the same term again.
Ref:
Expected Behavior Before Changes
A catalog search did not persist from the catalog to the UV.
Expected Behavior After Changes
A catalog search now persists to from the catalog to the UV.
Screenshots / Video
Notes
In the Screen cap, my UV reloads, for some reason it's only happening when I record my screen.