Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3087] Add DB constraint that primary and alternative phonenumber differ #1662

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma requested a review from swrichards March 12, 2025 14:40
@pi-sigma pi-sigma force-pushed the issue/3087-email-validation branch from 8a4b381 to 53e7a37 Compare March 12, 2025 14:40
@pi-sigma pi-sigma marked this pull request as ready for review March 12, 2025 14:40
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 97.36842% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.14%. Comparing base (788a90a) to head (896d1ee).

Files with missing lines Patch % Lines
src/open_inwoner/accounts/forms.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1662   +/-   ##
========================================
  Coverage    94.13%   94.14%           
========================================
  Files         1088     1090    +2     
  Lines        40150    40186   +36     
========================================
+ Hits         37797    37832   +35     
- Misses        2353     2354    +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.

@pi-sigma pi-sigma force-pushed the issue/3087-email-validation branch from 53e7a37 to 896d1ee Compare March 12, 2025 15:38
@pi-sigma pi-sigma requested a review from swrichards March 12, 2025 15:38
@@ -194,6 +194,10 @@ def clean_phonenumber_alternative(self):
"A primary phone number is required for setting an alternative phone number"
)
)
if phonenumber_alt and phonenumber_alt == phonenumber:
raise ValidationError(
_("Primary adn secondary phone numbers cannot be the same")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_("Primary adn secondary phone numbers cannot be the same")
_("Primary and secondary phone numbers cannot be the same")

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.

3 participants