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

[#2811] Exclude empty email/phone number from being sent with contactform #1455

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma force-pushed the issue/2811-klant-esuite branch 2 times, most recently from a0e103c to 19d556c Compare October 21, 2024 14:08
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 95.69892% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.56%. Comparing base (cf2b17c) to head (4a799f8).

Files with missing lines Patch % Lines
src/open_inwoner/openklant/views/contactform.py 93.10% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@swrichards swrichards self-requested a review October 22, 2024 15:13
Copy link
Collaborator

@swrichards swrichards left a 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

Comment on lines +108 to +130
user_email = (
api_user_email # pulled from klanten api
or getattr(self.request.user, "email", None)
or form.cleaned_data["email"]
)
Copy link
Collaborator

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.

@pi-sigma pi-sigma force-pushed the issue/2811-klant-esuite branch 3 times, most recently from 51d1782 to 6153caf Compare October 29, 2024 12:44
@pi-sigma pi-sigma marked this pull request as ready for review October 29, 2024 13:05
@pi-sigma pi-sigma requested a review from swrichards October 29, 2024 13:05
@pi-sigma pi-sigma force-pushed the issue/2811-klant-esuite branch from 6153caf to c153c30 Compare October 29, 2024 13:35
    - 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
@pi-sigma pi-sigma force-pushed the issue/2811-klant-esuite branch from c153c30 to 4a799f8 Compare October 29, 2024 14:40
@alextreme alextreme merged commit 176b8c1 into develop Oct 31, 2024
20 checks passed
@alextreme alextreme deleted the issue/2811-klant-esuite branch October 31, 2024 20:06
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.

4 participants