Skip to content

fix: use insert and delete instead of upsert for custom roles #14252

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

Conversation

jaaydenh
Copy link
Contributor

resolves #14245

@Emyrk Emyrk force-pushed the stevenmasley/custom_role_remove_upsert branch from 14da05a to c567a9d Compare August 12, 2024 21:24
@jaaydenh jaaydenh force-pushed the custom-role-remove-upsert-frontend branch from ffa67cf to 7042119 Compare August 12, 2024 21:47
@jaaydenh jaaydenh requested a review from aslilac August 12, 2024 21:52
Comment on lines 59 to 65
if (role) {
await updateOrganizationRoleMutation.mutateAsync(data);
navigate(`/organizations/${organizationName}/roles`);
} else {
await createOrganizationRoleMutation.mutateAsync(data);
navigate(`/organizations/${organizationName}/roles`);
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (role) {
await updateOrganizationRoleMutation.mutateAsync(data);
navigate(`/organizations/${organizationName}/roles`);
} else {
await createOrganizationRoleMutation.mutateAsync(data);
navigate(`/organizations/${organizationName}/roles`);
}
if (role) {
await updateOrganizationRoleMutation.mutateAsync(data);
} else {
await createOrganizationRoleMutation.mutateAsync(data);
}
navigate(`/organizations/${organizationName}/roles`);

Copy link

alwaysmeticulous bot commented Aug 13, 2024

🤖 Meticulous replayed 100 user sessions and took 1355 visual snapshots. Meticulous has not yet run on c567a9d of the main branch and so there was nothing to compare against.
If you recently setup Meticulous, this is expected. Meticulous will start reporting comparisons for new pull requests after the next commit to the main branch.

Last updated for commit 161ee26. This comment will update as new commits are pushed.

@jaaydenh jaaydenh merged commit 05f1814 into stevenmasley/custom_role_remove_upsert Aug 13, 2024
30 checks passed
@jaaydenh jaaydenh deleted the custom-role-remove-upsert-frontend branch August 13, 2024 16:46
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
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.

2 participants