Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
e0f32040
authored
Sep 12, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix VmRenameView
parent
fdf0285a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
circle/dashboard/views/vm.py
+2
-3
circle/vm/operations.py
+0
-1
No files found.
circle/dashboard/views/vm.py
View file @
e0f32040
...
@@ -735,10 +735,9 @@ class VmRenameView(FormOperationMixin, VmOperationView):
...
@@ -735,10 +735,9 @@ class VmRenameView(FormOperationMixin, VmOperationView):
extra
.
update
(
form
.
cleaned_data
)
extra
.
update
(
form
.
cleaned_data
)
resp
=
super
(
FormOperationMixin
,
self
)
.
post
(
resp
=
super
(
FormOperationMixin
,
self
)
.
post
(
request
,
extra
,
*
args
,
**
kwargs
)
request
,
extra
,
*
args
,
**
kwargs
)
new_name
=
request
.
POST
.
get
(
"new_name"
)
success_message
=
_
(
'VM successfully renamed.'
)
success_message
=
_
(
"VM successfully renamed."
)
if
request
.
is_ajax
():
if
request
.
is_ajax
():
return
JsonResponse
({
'new_name'
:
new_name
})
return
JsonResponse
({
'new_name'
:
extra
[
'new_name'
]
})
else
:
else
:
messages
.
success
(
request
,
success_message
)
messages
.
success
(
request
,
success_message
)
return
resp
return
resp
...
...
circle/vm/operations.py
View file @
e0f32040
...
@@ -1411,7 +1411,6 @@ class RenameOperation(InstanceOperation):
...
@@ -1411,7 +1411,6 @@ class RenameOperation(InstanceOperation):
required_perms
=
()
required_perms
=
()
def
_operation
(
self
,
user
,
activity
,
new_name
):
def
_operation
(
self
,
user
,
activity
,
new_name
):
old_name
=
self
.
instance
.
name
old_name
=
self
.
instance
.
name
self
.
instance
.
name
=
new_name
self
.
instance
.
name
=
new_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