See #170: include channel info in artist representations

This commit is contained in:
Eliot Berriot 2020-01-30 15:00:55 +01:00
parent 27f9c4e062
commit bf99e13230
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
5 changed files with 63 additions and 2 deletions

View file

@ -273,6 +273,12 @@ class Artist(APIModelMixin):
def cover(self):
return self.attachment_cover
def get_channel(self):
try:
return self.channel
except ObjectDoesNotExist:
return None
def import_artist(v):
a = Artist.get_or_create_from_api(mbid=v[0]["artist"]["id"])[0]