Skip to content

Commit

Permalink
feat: update error detail relation with integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Velentsevich authored and annvelents committed Jul 23, 2024
1 parent f02db0e commit 9239619
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/error_detail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class ErrorDetail < ApplicationRecord
include Discard::Model
self.discard_column = :deleted_at

belongs_to :integration, polymorphic: true
belongs_to :integration, polymorphic: true, optional: true
belongs_to :owner, polymorphic: true
end
4 changes: 3 additions & 1 deletion spec/factories/invoices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
end

trait :with_error do
error_details
after :create do |i|
create(:error_detail, owner: i)
end
end

trait :failed do
Expand Down

0 comments on commit 9239619

Please sign in to comment.