forked from Gitlink/forgeplus
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
8f45bcf959
|
@ -141,7 +141,7 @@ class Project < ApplicationRecord
|
|||
delegate :content, to: :project_detail, allow_nil: true
|
||||
delegate :name, to: :license, prefix: true, allow_nil: true
|
||||
|
||||
validate :validate_sensitive_string
|
||||
validate :validate_sensitive_string, on: [:create, :update]
|
||||
|
||||
def self.all_visible(user_id=nil)
|
||||
user_projects_sql = Project.joins(:owner).where(users: {type: 'User'}).to_sql
|
||||
|
@ -187,7 +187,7 @@ class Project < ApplicationRecord
|
|||
forked_project = self.forked_from_project
|
||||
if forked_project.present?
|
||||
forked_project.decrement(:forked_count, 1)
|
||||
forked_project.save
|
||||
forked_project.update_column(:forked_count, forked_project.forked_count)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#
|
||||
|
||||
class ProjectUnit < ApplicationRecord
|
||||
|
||||
belongs_to :project
|
||||
|
||||
enum unit_type: {code: 1, issues: 2, pulls: 3, wiki:4, devops: 5, versions: 6, resources: 7}
|
||||
|
|
Loading…
Reference in New Issue