nycmeshnet / meshdb

A convenient, stable, and sane database for tracking Members and Nodes for use with robots and humans
https://db.nycmesh.net
MIT License
12 stars 14 forks source link

Ask user to confirm info before creating Install #609

Closed WillNilges closed 1 month ago

WillNilges commented 2 months ago

Closes https://github.com/nycmeshnet/meshforms/issues/56

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 94.20%. Comparing base (59cc0de) to head (202fea9). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/meshapi/views/forms.py 97.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #609 +/- ## ========================================== + Coverage 94.15% 94.20% +0.04% ========================================== Files 80 80 Lines 3252 3278 +26 ========================================== + Hits 3062 3088 +26 Misses 190 190 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

WillNilges commented 1 month ago

Idea: Instead of logging PII, add some marker to the join form log expressing that there was a problem. That would require appending to an existing S3 object in meshforms, since it would save the submission immediately upon entry.

WillNilges commented 1 month ago

Yeah i think i already thought of this but http code

WillNilges commented 1 month ago

I think now all's I gotta do is update Meshforms. Having just spent 30+ hours learning more React, I have i d e a s.

WillNilges commented 1 month ago

Maybe I could include the PII in the Notes of the created user as well...?

WillNilges commented 1 month ago

This is almost done, but I'm seeing some inconsistencies with how the phone number parsing works and how it is stored in the DB. For example, I see every phone number stored like +1 555-555-5555, but that format is "corrected" in the join form (seemingly by the phonenumbers lib were using) to +1555-555-5555 but it shows up as the former in SQL.

WillNilges commented 1 month ago

Maybe Django is formatting it after the fact? IDK I need to do some more testing.

WillNilges commented 1 month ago
>>> print(phonenumbers.format_number(phonenumbers.parse("+1 614-307-4056", "US"), phonenumbers.PhoneNumberFormat.INTERNATIONAL))
+1 614-307-4056
>>> print(phonenumbers.format_number(phonenumbers.parse("+1614-307-4056", "US"), phonenumbers.PhoneNumberFormat.INTERNATIONAL))
+1 614-307-4056

image

WillNilges commented 1 month ago

yolo'ing it with approval to do so from @Andrew-Dickinson