Skip to content

Commit

Permalink
misc(event): Ensure updating charge filter is touching the related ch…
Browse files Browse the repository at this point in the history
…arge
  • Loading branch information
vincent-pochet committed Jul 4, 2024
1 parent dcf4444 commit 09d1d57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/charge_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ChargeFilter < ApplicationRecord
include Discard::Model
self.discard_column = :deleted_at

belongs_to :charge, -> { with_discarded }
belongs_to :charge, -> { with_discarded }, touch: true

has_many :values, class_name: 'ChargeFilterValue', dependent: :destroy
has_many :billable_metric_filters, through: :values
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

class CreateBillableMetricsGroupedCharges < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def change
create_view :billable_metrics_grouped_charges
end
Expand Down

0 comments on commit 09d1d57

Please sign in to comment.