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
253d06f0
Commit
253d06f0
authored
Nov 30, 2021
by
Matheus Miranda
Browse files
Remove update of modules status
parent
8c0b818e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
courses/models.py
courses/models.py
+1
-6
No files found.
courses/models.py
View file @
253d06f0
...
...
@@ -210,12 +210,7 @@ class Course(models.Model):
def
public_lessons
(
self
):
lessons
=
[]
for
lesson
in
self
.
lessons
.
all
():
if
lesson
.
status
==
'draft'
:
if
lesson
.
release_date
and
lesson
.
release_date
<=
timezone
.
now
():
lesson
.
status
=
'published'
lesson
.
save
()
lessons
.
append
(
lesson
)
else
:
if
lesson
.
status
==
'published'
:
lessons
.
append
(
lesson
)
return
lessons
...
...
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