We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a846692 commit e66d573Copy full SHA for e66d573
lib/travis/api/v3/models/job.rb
@@ -15,7 +15,6 @@ class Models::Job < Model
15
belongs_to :stage
16
belongs_to :owner, polymorphic: true
17
belongs_to :config, foreign_key: :config_id, class_name: Models::JobConfig
18
- belongs_to :restarter, foreign_key: :restarted_by, polymorphic: true, class_name: Models::User
19
serialize :config
20
serialize :debug_options
21
@@ -68,6 +67,10 @@ def migrated?
68
67
!!org_id
69
end
70
+ def restarter
71
+ @restarter ||= Travis::API::V3::Models::User.find(restarted_by)
72
+ end
73
+
74
private def enterprise?
75
!!Travis.config.enterprise
76
0 commit comments