lib/cocina/models/dro.rb in cocina-models-0.30.0 vs lib/cocina/models/dro.rb in cocina-models-0.31.0
- old
+ new
@@ -36,10 +36,10 @@
attribute :identification, Identification.optional.meta(omittable: true)
attribute :structural, DROStructural.optional.meta(omittable: true)
attribute :geographic, Geographic.optional.meta(omittable: true)
def self.new(attributes = default_attributes, safe = false, validate = true, &block)
- Validator.validate(self, attributes.with_indifferent_access) if validate
+ Validator.validate(self, attributes.with_indifferent_access) if validate && name
super(attributes, safe, &block)
end
end
end
end