Commit 9a72fc55 authored by Glaucia S. Santos's avatar Glaucia S. Santos
Browse files

Fix for a case of empty units and addition of a new item in complements

parent dd2f1afd
......@@ -58,8 +58,9 @@ class ActionSerializer(serializers.ModelSerializer):
def get_target(self, obj):
if isinstance(, LearningObject):
if not
return ''
if isinstance(, Forum):
if isinstance(, Classroom):
......@@ -137,4 +138,11 @@ class ActionSerializer(serializers.ModelSerializer):
course = 'do curso {}'.format(
compl = {'atividade': unit, 'etapa': step, 'curso': course}
return compl
if obj.action_object and
if isinstance(obj.action_object, Card) and isinstance(, Classroom):
title = 'o conteúdo {}'.format(obj.action_object.title)
classroom = 'na sala {}'.format(
compl = {'title': title, 'classroom': classroom, 'curso': ''}
return compl
return ''
\ No newline at end of file
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