Skip to content

Commit

Permalink
hotfix(taxes): Remove charges count from taxes serializer (#2877)
Browse files Browse the repository at this point in the history
- `count` on API serializer is causing a major performance issue
  • Loading branch information
jdenquin authored Nov 27, 2024
1 parent d26aa2b commit c59caed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/serializers/v1/tax_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def serialize
add_ons_count: model.add_ons.count,
customers_count: model.customers_count,
plans_count: model.plans.count,
charges_count: model.charges.count,
# DEPRECATED: this is creating a major performance issue
# charges_count: model.charges.count,
commitments_count: model.commitments.count,
created_at: model.created_at.iso8601
}
Expand Down
1 change: 0 additions & 1 deletion spec/serializers/v1/tax_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
'add_ons_count' => 0,
'customers_count' => 0,
'plans_count' => 0,
'charges_count' => 0,
'created_at' => tax.created_at.iso8601
)
end
Expand Down

0 comments on commit c59caed

Please sign in to comment.