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

Can't delete AI Resource that has is_part_of or has_part relationship #396

Open
PGijsbers opened this issue Nov 22, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@PGijsbers
Copy link
Collaborator

PGijsbers commented Nov 22, 2024

Describe the bug
Deleting a dataset when it has an is_part_of and has_part relation to other resources results in an error.
Example error:

ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`aiod`.`ai_resource_part_link`, CONSTRAINT `ai_resource_part_link_ibfk_2` FOREIGN KEY (`child_identifier`) REFERENCES `ai_resource` (`identifier`))

To Reproduce
TODO

Expected behavior
I expect to be able to delete a dataset even when it has an is_part_of and has_part relation to other resources.
The link should be removed accordingly (cascading deletes should work).

Additional context
n/a

@PGijsbers PGijsbers added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant