research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
27 stars 14 forks source link

Admin section delete project or organisation #1334

Closed dmijatovic closed 2 weeks ago

dmijatovic commented 3 weeks ago

Delete project or organisation fails

Deleting project or organisation from admin interface fails. We probably need to update delete rpc to include additional functionalities (tables). For projects we added testimonials and by organisation we added categories.

Delete project error

{
    "code": "23503",
    "details": "Key (id)=(e43fbbe0-a46b-41fc-9736-284459c29f0b) is still referenced from table \"testimonial_for_project\".",
    "hint": null,
    "message": "update or delete on table \"project\" violates foreign key constraint \"testimonial_for_project_project_fkey\" on table \"testimonial_for_project\""
}

Delete organisation error

{
    "code": "23503",
    "details": "Key (id)=(ee6dd80b-eb5b-470f-b14d-0727a2214bba) is still referenced from table \"category\".",
    "hint": null,
    "message": "update or delete on table \"organisation\" violates foreign key constraint \"category_organisation_fkey\" on table \"category\""
}