Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-13300

Empty release group with manually set cover art is not deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2023-11-27
    • None
    • Scripts
    • None

      If a release group has a manually-set cover, and then the release whose cover art is being used is then moved to another release group, it appears that we don't delete the reference that the first release group has to this release in the release_group_cover_art_table. This causes an error preventing otherwise-empty release groups ([1] for example) from being deleted.

      2023-10-02T00:21:50.187767Z Failed query:
      2023-10-02T00:21:50.187834Z     'DELETE FROM release_group WHERE id IN (?)
      2023-10-02T00:21:50.187861Z                      RETURNING gid AS entity_gid, id AS entity_id, name AS last_known_name, comment AS last_known_comment'
      2023-10-02T00:21:50.187885Z     (757515)
      2023-10-02T00:21:50.187908Z 23503 DBD::Pg::st execute failed: ERROR:  update or delete on table "release_group" violates foreign key constraint "release_group_cover_art_fk_release_group" on table "release_group_cover_art"
      2023-10-02T00:21:50.187930Z DETAIL:  Key (id)=(757515) is still referenced from table "release_group_cover_art". [for Statement "DELETE FROM release_group WHERE id IN (?) 

      [1] https://musicbrainz.org/release-group/20f6fbcf-225e-3d26-8f29-566c5b20742e

       

            bitmap Michael Wiencek
            bitmap Michael Wiencek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2023-11-27