Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
dd2f1afd
Commit
dd2f1afd
authored
Jan 08, 2021
by
Glaucia S. Santos
Browse files
Fix to check if has unit empty
parent
6dd91cdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
courses/stats/serializers.py
courses/stats/serializers.py
+1
-1
No files found.
courses/stats/serializers.py
View file @
dd2f1afd
...
@@ -131,7 +131,7 @@ class ActionSerializer(serializers.ModelSerializer):
...
@@ -131,7 +131,7 @@ class ActionSerializer(serializers.ModelSerializer):
def
get_complements
(
self
,
obj
):
def
get_complements
(
self
,
obj
):
if
obj
.
target
:
if
obj
.
target
:
if
isinstance
(
obj
.
target
,
LearningObject
):
if
isinstance
(
obj
.
target
,
LearningObject
)
and
obj
.
target
.
unit
:
unit
=
'a atividade {}'
.
format
(
obj
.
target
.
unit
.
title
)
unit
=
'a atividade {}'
.
format
(
obj
.
target
.
unit
.
title
)
step
=
'na etapa {}'
.
format
(
obj
.
target
.
unit
.
lesson
.
name
)
step
=
'na etapa {}'
.
format
(
obj
.
target
.
unit
.
lesson
.
name
)
course
=
'do curso {}'
.
format
(
obj
.
target
.
unit
.
lesson
.
course
.
name
)
course
=
'do curso {}'
.
format
(
obj
.
target
.
unit
.
lesson
.
course
.
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment