Skip to content

Draft: rework notes as episodes

Konrad Mohrfeldt requested to merge kmohrf/steering:feat/249-episodes into main

This MR contains the changes required for #249.

It should be good-to-merge, but I’m keeping it as draft until I’ve finished a minimal dashboard implementation that may turn up some edge cases we haven’t thought of, as well as any missing episode endpoint filters that most certainly will be necessary to implement the assignment logic of episodes to timeslots.

I’ve added a few tests including a two migration tests that should ensure that we correctly migrate any data. Nonetheless we should test this migration on a production database copy before we merge.

I’ve also noted that the existing serializer and viewset implementations for models often contain permission and ownership logic that can and IMHO should be abstracted to more generic solutions in order to avoid repetition and the need to override base implementations (like Serializer.create) as well as improving error handling in general. I’ve implemented these changes for the timeslot and episode endpoints, which come in the form of custom viewset permission classes (here and here) as well as a serializer mixin for field write permissions.

Happy to hear any feedback.

Merge request reports

Loading