mitodl / open-discussions

BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Refactor OCW writes away from serializers #2301

Open rhysyngsun opened 5 years ago

rhysyngsun commented 5 years ago

Summary

Currently, OCW data is written to the database via DRF serializers in course_catalog/serializers.py, this isn't really a use case DRF serializers were built for, so we should move away from them. We originally wrote it this way because it was a way to write relatively simple data structures to the DB with minimal code. Since then our usages have grown more complex and as we continue down that line DRF serializer usage here has become a major pain point in completely unrelated implementations. Particularly, we've run into the following issues in the past:

To do

pdpinch commented 4 years ago

@mbertrand @rhysyngsun was this the root cause of the issue we ran into with the popular courses API? Does it still need to be addressed?

rhysyngsun commented 4 years ago

Yes and yes.