Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
ce54a5c7
Commit
ce54a5c7
authored
Jun 16, 2017
by
Daniel W Bond
Browse files
room clearing command did not include a .save()
parent
411412fa
Pipeline
#1388
passed with stage
in 3 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/management/commands/clear_rooms.py
View file @
ce54a5c7
...
...
@@ -9,7 +9,9 @@ class Command(BaseCommand):
def
handle
(
self
,
*
args
,
**
kwargs
):
count
=
0
for
student
in
Student
.
objects
.
all
():
self
.
stdout
.
write
(
"Removing %s from %s."
%
(
student
,
student
.
room
))
student
.
room
=
None
student
.
save
()
count
+=
1
self
.
stdout
.
write
(
"Successfully overwrote %d student room(s)."
%
count
)
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