-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#2811] Exclude empty email/phone number from being sent with contactform #1455
Conversation
a0e103c
to
19d556c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1455 +/- ##
===========================================
- Coverage 94.59% 94.56% -0.03%
===========================================
Files 1065 1065
Lines 39728 39691 -37
===========================================
- Hits 37580 37535 -45
- Misses 2148 2156 +8 ☔ View full report in Codecov by Sentry. |
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.
Some preliminary comments, LGTM
user_email = ( | ||
api_user_email # pulled from klanten api | ||
or getattr(self.request.user, "email", None) | ||
or form.cleaned_data["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.
I actually think having the form email take precedence makes more sense (it is the most up-to-date, the user literally just provided it), but maybe we should discuss separately with @alextreme / Bobby as this is a change of behavior and not what the PR is about.
51d1782
to
6153caf
Compare
6153caf
to
c153c30
Compare
- don't attempt to create klant for anon user (this is not possible in the eSuite; relevant code is probably left-over from earlier implementation) - simplify logic by breaking out fetching of klant + creation of contactmoment into helper functions
c153c30
to
4a799f8
Compare
Taiga: https://taiga.maykinmedia.nl/project/open-inwoner/issue/2811