-
Notifications
You must be signed in to change notification settings - Fork 116
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
[6.16.z] remove user to prevent ForeignKeyViolation #17535
base: 6.16.z
Are you sure you want to change the base?
[6.16.z] remove user to prevent ForeignKeyViolation #17535
Conversation
xremove user to prevent ForeignKeyViolation (cherry picked from commit c2acadb)
trigger: test-robottelo |
PRT Result
|
trigger: test-robottelo |
PRT Result
|
@amolpati30 any update on the PRT failures? |
The changes I added sometimes work and sometimes do not. |
Cherrypick of PR: #17024
Problem -
When creating another user with a specific role and adding resources in the filter with the 'view_facts' permission, an error occurred ('PG::ForeignKeyViolation: ERROR: update or delete on table "hosts" violates foreign key constraint "fact_values_host_id_fk" on table "fact_values"') during the teardown process while deleting the host. This happened because a user with only view permissions existed for the host and making it impossible to update or delete the user associated with the fact.
Solution -
To prevent this error, the user was removed before the teardown process.