fcrespel / karaplan

Karaoke Planner web application with song search, ratings, comments, playlists and more
https://karaplan.crespel.me
MIT License
8 stars 9 forks source link

When a user joins a playlist through the link, the playlist locks into read-only #198

Closed renatolond closed 1 month ago

renatolond commented 1 month ago

Hi! Thanks a lot of karaplan, it's a lot of fun :)

Lately when user with friends I noticed that if I generate a link and send them to join the playlist, when they join, the playlist gets into read-only. If I set it back to writeable, it happens again when someone else joins.

If I had to guess it's because of this: https://github.com/fcrespel/karaplan/blob/master/src/main/java/me/crespel/karaplan/service/impl/PlaylistServiceImpl.java#L104-L108

fcrespel commented 1 month ago

Hi @renatolond, thanks for using KaraPlan and for this report :+1:. I can confirm the issue: it seems the Playlist object is persisted with the readOnly=true flag despite the fact that no save() is called explicitly. I guess this behavior changed during a library update, as it worked as expected before. I'll try to come up with a fix for it and let you know.

fcrespel commented 1 month ago

This should now be fixed in 9510704a5b8f582700f8c0b5250a61265f73b5a1 (and deployed to karaplan.crespel.me).

renatolond commented 1 month ago

I tested and it seems to be fixed, thanks a lot for the quick response 🙏🏼