-
Bug
-
Resolution: Fixed
-
Normal
-
NGS - Beta 3
-
None
If a relationship editor tries to delete a relationship type that's already in use, it doesn't check whether it can be deleted first, so I got an error like:
Caught exception in MusicBrainz::Server::Controller::Admin::LinkType->delete "Failed query:
'DELETE FROM link_type WHERE id = ?'
(279)
DBD::Pg::st execute failed: ERROR: update or delete on table "link_type" violates foreign key constraint "link_fk_link_type" on table "link"
DETAIL: Key (id)=(279) is still referenced from table "link". at /home/mbserver/musicbrainz/mb_server-next/script/../lib/Sql.pm line 102.
at /home/mbserver/musicbrainz/mb_server-next/script/../lib/MusicBrainz/Server/Data/LinkType.pm line 196
at /home/mbserver/musicbrainz/mb_server-next/script/../lib/MusicBrainz/Server/Controller/Admin/LinkType.pm line 144"
Probably not very high priority since only a handful of people can even edit relationship types, but we have a nice "still in use" page for relationship attributes, so I don't see why we shouldn't have one for the relationships themselves as well.