-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Fix for GWE-282-0 #5126
Fix for GWE-282-0 #5126
Conversation
@@ -275,6 +276,10 @@ def email_settings(request, key): | |||
preferred_language = request.POST.get('preferred_language') | |||
validation_passed = True | |||
try: | |||
email_in_use = User.objects.filter(email=email) | User.objects.filter(profile__email=email) | |||
email_used_marketing = EmailSubscriber.objects.filter(email=email).select_related('profile') | |||
if (email_in_use or email_used_marketing) and (request.user.email != email or request.user.profile.email != email): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ We've got CI failures 🤔
@androolloyd mind running the pre commit hooks? that will auto fix the sorting error
Codecov Report
@@ Coverage Diff @@
## master #5126 +/- ##
=========================================
- Coverage 30.9% 30.9% -0.01%
=========================================
Files 219 219
Lines 17618 17623 +5
Branches 2427 2428 +1
=========================================
+ Hits 5445 5446 +1
- Misses 11950 11952 +2
- Partials 223 225 +2
Continue to review full report at Codecov.
|
Description
Addressing GWE-282-0
Refers/Fixes
#5125
Testing
Unable to reproduce GWE-282-0 with this change.