This commit is contained in:
yystopf 2023-03-10 14:58:16 +08:00
parent dae3715594
commit 9a8bbc2d03
3 changed files with 4 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class Api::V1::Issues::CreateService < ApplicationService
check_assigners(assigner_ids) unless assigner_ids.blank?
check_attachments(attachment_ids) unless attachment_ids.blank?
check_atme_receivers(receivers_login) unless receivers_login.blank?
check_blockchain_token_num(project.user_id, project.id, blockchain_token_num) if blockchain_token_num.present?
check_blockchain_token_num(current_user.id, project.id, blockchain_token_num) if blockchain_token_num.present?
load_assigners(assigner_ids) unless assigner_ids.blank?
load_attachments(attachment_ids) unless attachment_ids.blank?
load_issue_tags(issue_tag_ids) unless issue_tag_ids.blank?

View File

@ -42,7 +42,7 @@ class Api::V1::Issues::UpdateService < ApplicationService
check_assigners(assigner_ids) unless assigner_ids.nil?
check_attachments(attachment_ids) unless attachment_ids.nil?
check_atme_receivers(receivers_login) unless receivers_login.nil?
check_blockchain_token_num(project.user_id, project.id, blockchain_token_num, (@issue.blockchain_token_num || 0)) if blockchain_token_num.present?
check_blockchain_token_num(issue.author_id, project.id, blockchain_token_num, (@issue.blockchain_token_num || 0)) if blockchain_token_num.present? && current_user.id == @issue.author_id && !PullAttachedIssue.exists?(issue_id: @issue, fixed: true)
load_assigners(assigner_ids)
load_attachments(attachment_ids)
load_issue_tags(issue_tag_ids)

View File

@ -43,4 +43,5 @@ json.comment_journals_count issue.comment_journals.size
json.operate_journals_count issue.operate_journals.size
json.attachments issue.attachments.each do |attachment|
json.partial! "api/v1/attachments/simple_detail", locals: {attachment: attachment}
end
end
json.pull_fixed issue.pull_attached_issues.fixed.present?