WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@filipmlynarski-mirumee
Copy link
Contributor

@filipmlynarski-mirumee filipmlynarski-mirumee commented Nov 12, 2025

Fix: Return currency in FixedCurrencyMoneyInput.decompress() when value is None

Problem

FixedCurrencyMoneyInput.decompress() returns [None, None] when value is None, causing the hidden currency input to have no value. This leads to form validation errors and data corruption.

Solution

Changed to return [None, self.currency] to ensure the currency is always available.

Impact

  • Fixes form submission failures with empty price fields
  • Prevents database corruption from empty currency codes
  • Backwards compatible - only affects empty/None values

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.94%. Comparing base (eb5dfe5) to head (16174a6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   97.70%   97.94%   +0.24%     
==========================================
  Files          13       13              
  Lines         479      487       +8     
==========================================
+ Hits          468      477       +9     
+ Misses         11       10       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants