app/models/spotlight/resources/upload.rb in blacklight-spotlight-3.0.0.rc4 vs app/models/spotlight/resources/upload.rb in blacklight-spotlight-3.0.0.rc5
- old
+ new
@@ -39,20 +39,20 @@
def sidecar
@sidecar ||= document_model.new(id: compound_id).sidecar(exhibit)
end
def to_solr
- return {} unless upload.file_present?
+ return {} unless upload&.file_present?
spotlight_routes = Spotlight::Engine.routes.url_helpers
riiif = Riiif::Engine.routes.url_helpers
dimensions = Riiif::Image.new(upload_id).info
{
spotlight_full_image_width_ssm: dimensions.width,
spotlight_full_image_height_ssm: dimensions.height,
- Spotlight::Engine.config.thumbnail_field => riiif.image_path(upload_id, size: '!400,400'),
+ Spotlight::Engine.config.thumbnail_field => riiif.image_path(upload, size: '!400,400'),
Spotlight::Engine.config.iiif_manifest_field => spotlight_routes.manifest_exhibit_solr_document_path(exhibit, compound_id)
}
end
private