Skip to content

Commit

Permalink
Modify Audit.finalized_since? to use updated_at value
Browse files Browse the repository at this point in the history
To be consistent with query in DistributionsController#edit action
  • Loading branch information
jp524 committed May 31, 2024
1 parent 3a4658d commit 3e9963b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def self.finalized_since?(itemizable, *location_ids)
item_ids = itemizable.line_items.pluck(:item_id)
where(status: "finalized")
.where(storage_location_id: location_ids)
.where(created_at: itemizable.created_at..)
.where(updated_at: itemizable.created_at..)
.joins(:line_items)
.where(line_items: {item_id: item_ids})
.exists?
Expand Down

0 comments on commit 3e9963b

Please sign in to comment.