BigW Consortium Gitlab

Validate presence of provider field in Identity

parent 615257b9
......@@ -14,6 +14,7 @@ class Identity < ActiveRecord::Base
include Sortable
belongs_to :user
validates :provider, presence: true
validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider }
validates :user_id, uniqueness: { scope: :provider }
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