Populate release_ids and included_release_groups when record is created

This commit is contained in:
Claudio Ortolina
2024-11-18 15:34:16 +00:00
parent 2c33b2ca0b
commit 87cd668a33
7 changed files with 34 additions and 1 deletions
+2
View File
@@ -51,6 +51,8 @@ defmodule MusicLibrary.Records.Record do
])
|> cast_embed(:artists, with: &artist_changeset/2)
|> generate_cover_hash()
|> update_release_ids()
|> update_included_release_group_ids()
|> validate_required([:type, :title, :musicbrainz_id, :release, :genres])
|> unique_constraint(:musicbrainz_id, name: "records_musicbrainz_id_format_index")
end