Merge branch 'dev_trustie' into dev_devops
This commit is contained in:
commit
003db1405d
|
@ -29,7 +29,7 @@ class Oauth::EducoderController < Oauth::BaseController
|
|||
user = mail_user
|
||||
end
|
||||
|
||||
if user.is_a?(User)
|
||||
if user.is_a?(User) && !user.is_a?(AnonymousUser)
|
||||
OpenUsers::Educoder.create!(user: user, uid: uid)
|
||||
successful_authentication(user)
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
class ForkUser < ApplicationRecord
|
||||
belongs_to :project
|
||||
belongs_to :project
|
||||
belongs_to :user
|
||||
belongs_to :fork_project, class_name: 'ForkUser', foreign_key: :fork_project_id
|
||||
|
||||
end
|
||||
|
|
|
@ -18,6 +18,7 @@ class Project < ApplicationRecord
|
|||
has_many :project_trends, dependent: :destroy
|
||||
has_many :watchers, as: :watchable, dependent: :destroy
|
||||
has_many :fork_users, dependent: :destroy
|
||||
has_many :forked_users, class_name: 'ForkUser', foreign_key: :fork_project_id, dependent: :destroy
|
||||
# has_many :commits, dependent: :destroy
|
||||
|
||||
has_one :project_score, dependent: :destroy
|
||||
|
|
Loading…
Reference in New Issue