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 Anna Velentsevich committed Jul 22, 2024
1 parent 1e913dd commit e5efbbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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
6 changes: 4 additions & 2 deletions spec/factories/invoices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
payment_dispute_lost_at { DateTime.current - 1.day }
end

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

0 comments on commit e5efbbd

Please sign in to comment.