Skip to content
Snippets Groups Projects
Commit a8e4e6aa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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
No related branches found
No related tags found
Loading
Loading
@@ -14,6 +14,7 @@ class Identity < ActiveRecord::Base
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment