[music] Fix getting album when duplicated name
This commit is contained in:
@ -532,6 +532,8 @@ class Album(TimeStampedModel):
|
|||||||
logger.info(
|
logger.info(
|
||||||
f"Could not find album {name} with artist {artist.name} on musicbrainz"
|
f"Could not find album {name} with artist {artist.name} on musicbrainz"
|
||||||
)
|
)
|
||||||
|
album = Album.objects.filter(name=name).first()
|
||||||
|
if not album:
|
||||||
album, created = Album.objects.get_or_create(
|
album, created = Album.objects.get_or_create(
|
||||||
name=name,
|
name=name,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user