lib/alma/availability_response.rb in alma-0.6.1 vs lib/alma/availability_response.rb in alma-0.6.2
- old
+ new
@@ -33,13 +33,15 @@
# Get all the subfields for this inventory field
fetch("subfield", []).
# Limit to only subfields codes for which we have a mapping
select { |sf| subfield_codes.key? sf["code"] }.each { |f|
key = subfield_codes[f["code"]]
- if h.key? key
- h[key] << " " + f["content"]
- else
- h[key] = f["content"]
+ unless key.blank? || f["content"].blank?
+ if h.key? key
+ h[key] << " " + f["content"]
+ else
+ h[key] = f["content"]
+ end
end
}
holdings << h
end
holdings