Commit cae9e9f7 authored by James Lopez's avatar James Lopez

fix validation

parent ab657be2
...@@ -5,8 +5,8 @@ class LdapGroupLink < ActiveRecord::Base ...@@ -5,8 +5,8 @@ class LdapGroupLink < ActiveRecord::Base
BLANK_ATTRIBUTES = %w[cn filter].freeze BLANK_ATTRIBUTES = %w[cn filter].freeze
with_options if: :cn do |link| with_options if: :cn do |link|
link.validates :cn, :group_access, :group_id, presence: true, unless: :filter link.validates :cn, :group_access, :group_id, presence: true
link.validates :cn, uniqueness: { scope: [:group_id, :provider] }, if: :cn link.validates :cn, uniqueness: { scope: [:group_id, :provider] }
link.validates :filter, absence: true link.validates :filter, absence: true
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment