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

Remove AnonymousUser #5884

Merged
merged 1 commit into from
Feb 17, 2025
Merged

Remove AnonymousUser #5884

merged 1 commit into from
Feb 17, 2025

Conversation

rowanseymour
Copy link
Member

No description provided.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ff1d39f) to head (ee6ebab).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #5884   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          488       488           
  Lines        25242     25235    -7     
=========================================
- Hits         25242     25235    -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -603,7 +601,7 @@ def contact_resolve(org, phone: str) -> tuple:
if contact_urn:
contact = contact_urn.contact
else:
contact = create_contact_locally(org, user, name="", language="", urns=[urn], fields={}, group_uuids=[])
contact = create_contact_locally(org, None, name="", language="", urns=[urn], fields={}, group_uuids=[])

Choose a reason for hiding this comment

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

We allow created_by to be null for contacts! why not use system user instead here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't want mailroom and courier to have to find the system user.. null user feels more right anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Although... I'm having second thoughts about this. Courier and Mailroom were just using userid=1 which isn't even the same thing on our deployments. Maybe it would be nicer from a auditing point of view if all engine modifications to a contact used system.. instead of null meaning that.. modified_by=null makes it look like it was never modified.

@rowanseymour rowanseymour merged commit 9507e58 into main Feb 17, 2025
5 checks passed
@rowanseymour rowanseymour deleted the remove_anon_user branch February 17, 2025 14:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants