Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
386b5d3e
authored
Feb 27, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: change filter+update to enable-disable in NodeStatus
parent
2410e2e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
circle/dashboard/views.py
+2
-4
No files found.
circle/dashboard/views.py
View file @
386b5d3e
...
...
@@ -1269,11 +1269,9 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
def
__set_status
(
self
,
request
):
self
.
object
=
self
.
get_object
()
if
not
self
.
object
.
enabled
:
Node
.
objects
.
filter
(
pk
=
self
.
object
.
pk
)
.
update
(
**
{
'enabled'
:
True
})
self
.
object
.
enable
(
user
=
request
.
user
)
else
:
Node
.
objects
.
filter
(
pk
=
self
.
object
.
pk
)
.
update
(
**
{
'enabled'
:
False
})
self
.
object
.
disable
(
user
=
request
.
user
)
success_message
=
_
(
"Node successfully changed status!"
)
...
...
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