lib/relaton/db.rb in relaton-1.11.5 vs lib/relaton/db.rb in relaton-1.12.0

- old
+ new

@@ -215,10 +215,10 @@ def search_edition_year(file, content, edition, year) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity processor = @registry.processor_by_ref(file.split("/")[-2]) item = if file.match?(/xml$/) then processor.from_xml(content) else processor.hash_to_bib(YAML.safe_load(content)) end - item if (edition.nil? || item.edition == edition) && (year.nil? || + item if (edition.nil? || item.edition.content == edition) && (year.nil? || item.date.detect { |d| d.type == "published" && d.on(:year).to_s == year.to_s }) end # @param xml [String] content in XML format # @param text [String, nil] text to serach