Fix update course

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 70c2787228
commit 585323e357
  1. 2
      api/v1/serializers/course.py

@ -138,7 +138,7 @@ class CourseCreateSerializer(DispatchContentMixin,
materials = validated_data.pop('materials', [])
gallery = validated_data.pop('gallery', {})
author = validated_data.get('author', None)
if not author:
if not instance.author or not author:
validated_data['author'] = self.context['request'].user
course = super().update(instance, validated_data)
self.dispatch_materials(course, materials)

Loading…
Cancel
Save