fix: locale-dependent category duplication bug (#956)

* fix: locale-dependent category duplication bug

* fix: use family locale for investment contributions category to prevent duplicates and handle legacy data

* Remove v* tag trigger from flutter-build to fix double-runs

publish.yml already calls flutter-build via workflow_call on v* tags,
so the direct push trigger was causing duplicate workflow runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor mobile release asset flow

* fix: category uniqueness and workflow issues

* fix: fix test issue

* fix: solve test issue

* fix: resolve legacy problem

* fix: solve lint test issue

* fix: revert unrelated changes

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
BitToby
2026-02-15 06:33:51 -03:00
committed by GitHub
parent 326b925690
commit e573896efe
8 changed files with 185 additions and 12 deletions

View File

@@ -81,11 +81,14 @@ module ActiveSupport
# Ensures the Investment Contributions category exists for a family
# Used in transfer tests where this bootstrapped category is required
# Uses family locale to ensure consistent naming
def ensure_investment_contributions_category(family)
family.categories.find_or_create_by!(name: Category.investment_contributions_name) do |c|
c.color = "#0d9488"
c.lucide_icon = "trending-up"
c.classification = "expense"
I18n.with_locale(family.locale) do
family.categories.find_or_create_by!(name: Category.investment_contributions_name) do |c|
c.color = "#0d9488"
c.lucide_icon = "trending-up"
c.classification = "expense"
end
end
end
end