Browse Source

Merge branch 'develop' into standalone_develop

pull/313/head
yystopf 4 years ago
parent
commit
0fa5bb2211
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      app/models/project.rb
  2. +2
    -0
      app/models/project_unit.rb

+ 1
- 1
app/models/project.rb View File

@@ -138,7 +138,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


+ 2
- 0
app/models/project_unit.rb View File

@@ -14,6 +14,8 @@
#

class ProjectUnit < ApplicationRecord

default_scope {where(unit_type: ProjectUnit.unit_types.keys)}
belongs_to :project

enum unit_type: {code: 1, issues: 2, pulls: 3, wiki:4, devops: 5, versions: 6, resources: 7, services: 8}


Loading…
Cancel
Save