新增:工作项关联项目查询

This commit is contained in:
yystopf 2023-11-20 08:29:18 +08:00
parent 40c5525e0a
commit 6d90cbed81
2 changed files with 2 additions and 2 deletions

View File

@ -487,7 +487,7 @@ class Project < ApplicationRecord
end
def full_url
Rails.application.config_for(:configuration)['platform_url'] + '/' + self.owner.try(:login) + '/' + self.identifier
Rails.application.config_for(:configuration)['platform_url'].to_s + '/' + self.owner&.try(:login).to_s + '/' + self.identifier.to_s
end
def to_builder

View File

@ -59,7 +59,7 @@ json.pm_project_id issue.pm_project_id
json.time_scale issue.time_scale
json.child_count issue.child_count
json.project do
if issue.project.present?
if issue.project.present? && issue.owner.present?
json.partial! "api/v1/projects/detail", locals: {project: issue.project}
else
json.nil!