lib/cocina/models/admin_policy.rb in cocina-models-0.30.0 vs lib/cocina/models/admin_policy.rb in cocina-models-0.31.0
- old
+ new
@@ -15,10 +15,10 @@
attribute :version, Types::Strict::Integer
attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new })
attribute :description, Description.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