Import fails if musicbrainz id tag is missing
Steps to reproduce
Import file partially tagged with musicbrainz/picard
What happens?
# journalctl -xn -u funkwhale-worker
-- Logs begin at Wed 2018-09-19 21:11:08 CEST, end at Wed 2018-09-19 23:56:36 CEST. --
sep 19 23:50:26 darkstone celery[15427]: return cls.create_from_api(id=mbid), True
sep 19 23:50:26 darkstone celery[15427]: File "/srv/funkwhale/api/funkwhale_api/music/models.py", line 60, in create_from_api
sep 19 23:50:26 darkstone celery[15427]: cleaned_data = cls.clean_musicbrainz_data(raw_data)
sep 19 23:50:26 darkstone celery[15427]: File "/srv/funkwhale/api/funkwhale_api/music/models.py", line 69, in clean_musicbrainz_data
sep 19 23:50:26 darkstone celery[15427]: cleaned_key, cleaned_value = mapping.from_musicbrainz(key, value)
sep 19 23:50:26 darkstone celery[15427]: File "/srv/funkwhale/api/funkwhale_api/music/importers.py", line 46, in from_musicbrainz
sep 19 23:50:26 darkstone celery[15427]: self._from_musicbrainz[key]["converter"](value),
sep 19 23:50:26 darkstone celery[15427]: File "/srv/funkwhale/api/funkwhale_api/music/models.py", line 221, in import_album
sep 19 23:50:26 darkstone celery[15427]: a = Album.get_or_create_from_api(mbid=v[0]["id"])[0]
sep 19 23:50:26 darkstone celery[15427]: IndexError: list index out of range
What is expected?
It seems the "id" tag is missing. This should not make the import to fail.
Context
Musicbrainz sometimes can't find the album, the user edits the tags manually and thus doesn't provide all the info that the automatic Musicbrainz tagging does.