mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.52k stars 459 forks source link

Bugfix: Playlist view crashes when media list is undefined #922

Open tobocop2 opened 7 months ago

tobocop2 commented 7 months ago

@mgogoulos

Description

Playlists with no media cannot be modified. If you create a playlist and do not add media to the playlist, there is a very loud error around the media list being undefined for the playlist. This fix adds some safety checks before attempting to view the playlist.

Steps

Pre-deploy

cd frontend
npm run dist
cp -ra dist/static/* ../static/

Post-deploy

Verify that an empty playlist can be modified in the UI.

tobocop2 commented 7 months ago

tagging for visibility @mgogoulos