mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-12-25 16:28:49 +01:00
allow media of all states to be added to playlist (#154)
This commit is contained in:
parent
be41c6876d
commit
adf3d4377f
@ -1386,7 +1386,7 @@ class Playlist(models.Model):
|
||||
@property
|
||||
def thumbnail_url(self):
|
||||
pm = self.playlistmedia_set.first()
|
||||
if pm:
|
||||
if pm and pm.media.thumbnail:
|
||||
return helpers.url_from_path(pm.media.thumbnail.path)
|
||||
return None
|
||||
|
||||
|
@ -896,7 +896,7 @@ class PlaylistDetail(APIView):
|
||||
|
||||
if action in ["add", "remove", "ordering"]:
|
||||
media = Media.objects.filter(
|
||||
friendly_token=media_friendly_token, state="public"
|
||||
friendly_token=media_friendly_token
|
||||
).first()
|
||||
if media:
|
||||
if action == "add":
|
||||
|
Loading…
Reference in New Issue
Block a user