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

Allow WebUser invites to be editable before the invited user accepts it #35538

Merged
merged 14 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion corehq/apps/users/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,9 @@ def invite_web_user_form(self):
if invitation:
assigned_location = invitation.assigned_locations.filter()
assigned_location_ids = [loc.location_id for loc in assigned_location]
primary_location_id = invitation.primary_location.location_id
primary_location_id = None
if assigned_location_ids:
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this check primary_location instead of assigned_location_ids? It should work the same in either case, just seems clearer

primary_location_id = invitation.primary_location.location_id
initial = {
'email': invitation.email,
'role': invitation.role,
Expand Down