Commit a8e4e6aa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'identity-validation' into 'master'

Validate presence of provider field in Identity
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !869
parents 4b31f4b6 21e227d8
...@@ -14,6 +14,7 @@ class Identity < ActiveRecord::Base ...@@ -14,6 +14,7 @@ class Identity < ActiveRecord::Base
include Sortable include Sortable
belongs_to :user belongs_to :user
validates :provider, presence: true
validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider } validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider }
validates :user_id, uniqueness: { scope: :provider } validates :user_id, uniqueness: { scope: :provider }
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