Skip to content

Conversation

@jtrobles-cdd
Copy link
Member

In Django model field RutField, when field option validate_dv is enabled, the to_python() method does not validate the "digito verificador" if the input value is already an instance of Rut.

This commit changes the implementation of to_python() so that the "digito verificador" is also validated for Rut instances when the validate_dv field option is enabled.

@jtrobles-cdd jtrobles-cdd self-assigned this Sep 10, 2025
@jtrobles-cdd jtrobles-cdd requested a review from a team as a code owner September 10, 2025 20:23
@jtrobles-cdd jtrobles-cdd added bug Something isn't working component: rut labels Sep 10, 2025
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.76%. Comparing base (f3fb37a) to head (a06fd3c).

Files with missing lines Patch % Lines
src/cl_sii/extras/dj_model_fields.py 71.42% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #882      +/-   ##
===========================================
- Coverage    88.82%   88.76%   -0.07%     
===========================================
  Files           38       38              
  Lines         3498     3506       +8     
  Branches       342      345       +3     
===========================================
+ Hits          3107     3112       +5     
- Misses         239      241       +2     
- Partials       152      153       +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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jtrobles-cdd jtrobles-cdd force-pushed the fix-rut-instance-dv-validation-dj-model-field branch from a06fd3c to 110a532 Compare September 10, 2025 20:49
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.87%. Comparing base (f7fb5ed) to head (dd7561b).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #882      +/-   ##
===========================================
+ Coverage    88.81%   88.87%   +0.05%     
===========================================
  Files           38       38              
  Lines         3497     3505       +8     
  Branches       342      345       +3     
===========================================
+ Hits          3106     3115       +9     
  Misses         239      239              
+ Partials       152      151       -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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jtrobles-cdd jtrobles-cdd force-pushed the fix-rut-instance-dv-validation-dj-model-field branch from 110a532 to cd92471 Compare September 10, 2025 20:55
In Django model field `RutField`, when field option `validate_dv` is
enabled, the `to_python()` method does not validate the "digito verificador"
if the input value is already an instance of `Rut`.

This commit changes the implementation of `to_python()` so that the
"digito verificador" is also validated for `Rut` instances when the
`validate_dv` field option is enabled.
@jtrobles-cdd jtrobles-cdd force-pushed the fix-rut-instance-dv-validation-dj-model-field branch from cd92471 to dd7561b Compare September 10, 2025 21:07
@sonarqubecloud
Copy link

@jtrobles-cdd jtrobles-cdd merged commit 28f7dad into develop Sep 10, 2025
21 checks passed
@jtrobles-cdd jtrobles-cdd deleted the fix-rut-instance-dv-validation-dj-model-field branch September 10, 2025 21:10
@jtrobles-cdd jtrobles-cdd mentioned this pull request Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working component: rut

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants