Commit 0fa3dcc4 authored by Matheus Miranda's avatar Matheus Miranda

Merge branch 'develop' into 'master'

Fix to save text of material

See merge request !52
parents 4de29c5f 13338872
......@@ -20,6 +20,11 @@ class CourseMaterialViewSet(viewsets.ModelViewSet):
self.kwargs['course'] = obj.course
return super(CourseMaterialViewSet, self).pre_save(obj)
def perform_update(self, serializer):
instance = CourseMaterial.objects.get(id=self.request.data['id'])
instance.text = self.request.data['text']
instance.save()
class CourseMaterialFileViewSet(viewsets.ModelViewSet):
model = CourseMaterialFile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment