mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
修复:悬赏金额可以为空
This commit is contained in:
@@ -11,7 +11,7 @@ class Api::V1::Issues::CreateService < ApplicationService
|
||||
validates :subject, presence: true
|
||||
validates :status_id, :priority_id, presence: true
|
||||
validates :project, :current_user, presence: true
|
||||
validates :blockchain_token_num, numericality: {greater_than: 0}
|
||||
validates :blockchain_token_num, numericality: {greater_than: 0}, allow_blank: true
|
||||
|
||||
def initialize(project, params, current_user = nil)
|
||||
@project = project
|
||||
|
||||
@@ -9,7 +9,7 @@ class Api::V1::Issues::UpdateService < ApplicationService
|
||||
attr_accessor :add_assigner_ids, :previous_issue_changes, :updated_issue, :atme_receivers
|
||||
|
||||
validates :project, :issue, :current_user, presence: true
|
||||
validates :blockchain_token_num, numericality: {greater_than: 0}
|
||||
validates :blockchain_token_num, numericality: {greater_than: 0}, allow_blank: true
|
||||
|
||||
def initialize(project, issue, params, current_user = nil)
|
||||
@project = project
|
||||
|
||||
Reference in New Issue
Block a user