From 19ffd9fea1b71ed44894f5ccb18760a14e9a4adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxxq250=E2=80=9D?= <“xxq250@qq.com”> Date: Tue, 26 Jul 2022 10:55:42 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20PullRequest=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=85=B3=E8=81=94=E5=85=B3=E7=B3=BB=E5=AD=97=E6=AE=B5gitea=5Fi?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/pull_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/pull_request.rb b/app/models/pull_request.rb index b3ab1e03b..4ced61aa4 100644 --- a/app/models/pull_request.rb +++ b/app/models/pull_request.rb @@ -37,7 +37,7 @@ class PullRequest < ApplicationRecord has_many :pull_request_tags, foreign_key: :pull_request_id has_many :project_trends, as: :trend, dependent: :destroy has_many :attachments, as: :container, dependent: :destroy - has_one :gitea_pull, foreign_key: :id, primary_key: :gitea_number, class_name: 'Gitea::Pull' + has_one :gitea_pull, foreign_key: :id, primary_key: :gitea_id, class_name: 'Gitea::Pull' has_many :journals, :as => :journalized, :dependent => :destroy has_many :journal_details, through: :journals has_many :reviews, dependent: :destroy