mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 03:09:55 +02:00
See #170: include channel info in artist representations
This commit is contained in:
parent
27f9c4e062
commit
bf99e13230
5 changed files with 63 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue