cul-it / exhibits-library-cornell-edu

Spotlight
3 stars 2 forks source link

LP-69 - Images can be added to items with no images #642

Closed chrisrlc closed 10 months ago

chrisrlc commented 10 months ago

https://culibrary.atlassian.net/browse/LP-69

Overrides SolrDocument#update_exhibit_resource from Spotlight: https://github.com/projectblacklight/spotlight/blob/v3.5.0.2/app/models/concerns/spotlight/solr_document.rb#L75-L79

chrisrlc commented 10 months ago

I thought another test that might make sense would be to check that removing an image from an item works. But then I tried the the UI to see if thats even possible and realized it isn't. Wondering why items can be created without an image in the first place? Maybe they serve as placeholders? Anyways, this looks good.

@sarah-cul Thanks for taking a look! Another approach I considered to this was just not allowing users to add items without images, but I didn't want to take away functionality - like you said, it could be useful to add placeholder items and add the image later. We also might not want required images if we make changes in the future so that items don't need to be attached to newly uploaded image files - maybe they're attached to records in DCP or non-images or etc.