mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
更改:解绑操作放在回调里
This commit is contained in:
@@ -24,5 +24,12 @@ class SyncRepository < ApplicationRecord
|
||||
belongs_to :project
|
||||
has_many :sync_repository_branches, dependent: :destroy
|
||||
|
||||
before_destroy :unbind_reposyncer
|
||||
|
||||
validates :repo_name, uniqueness: { message: "已存在" }
|
||||
|
||||
def unbind_reposyncer
|
||||
Reposync::DeleteRepoService.call(self.repo_name)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user