This commit is contained in:
parent
c5ad8ff33f
commit
d7c1ce7595
|
@ -61,7 +61,7 @@ class Api::V1::Issues::CreateService < ApplicationService
|
|||
@created_issue.save!
|
||||
|
||||
if Site.has_blockchain? && @project.use_blockchain
|
||||
if @created_issue.blockchain_token_num > 0
|
||||
if @created_issue.blockchain_token_num.present? && @created_issue.blockchain_token_num > 0
|
||||
Blockchain::CreateIssue.call({user_id: @created_issue.author_id, project_id: @created_issue.project_id, token_num: @created_issue.blockchain_token_num})
|
||||
end
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class Api::V1::Issues::ListService < ApplicationService
|
|||
issues = issues.where(status_id: status_id) if status_id.present?
|
||||
|
||||
# keyword
|
||||
issues = issues.ransack(id_eq: params[:keyword]).result.or(issues.ransack(subject_or_description_cont: keyword).result) if keyword.present?
|
||||
issues = issues.ransack(id_eq: keyword).result.or(issues.ransack(subject_or_description_cont: keyword).result) if keyword.present?
|
||||
|
||||
@total_issues_count = issues.distinct.size
|
||||
@closed_issues_count = issues.closed.distinct.size
|
||||
|
|
Loading…
Reference in New Issue