修复:悬赏金额可以为空

This commit is contained in:
yystopf 2023-03-07 17:43:10 +08:00
parent b44ab1e39e
commit 75d74f80ca
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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