diff --git a/lib/xml_schema_validator.rb b/lib/xml_schema_validator.rb index 199050630..672779af9 100644 --- a/lib/xml_schema_validator.rb +++ b/lib/xml_schema_validator.rb @@ -35,7 +35,7 @@ def validate_each(record, attribute, value) kernel = get_valid_kernel(record.schema_version) return false unless kernel.present? - if ["http://datacite.org/schema/kernel-2.2", "http://datacite.org/schema/kernel-2.2"].include?(record.schema_version) + if record.new_record? && ["http://datacite.org/schema/kernel-2.2", "http://datacite.org/schema/kernel-2.2"].include?(record.schema_version) record.errors[:xml] << "Schema #{record.schema_version} is no longer supported" return false end