Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
re2o
Commits
2b07beea
Commit
2b07beea
authored
Dec 24, 2016
by
chirac
Browse files
Bricoles 2
parent
a87f5e66
Changes
1
Hide whitespace changes
Inline
Side-by-side
topologie/views.py
View file @
2b07beea
...
...
@@ -12,7 +12,7 @@ from topologie.forms import EditPortForm, NewSwitchForm, EditSwitchForm, AddPort
from
users.views
import
form
from
users.models
import
User
from
machines.forms
import
NewMachineForm
,
EditMachineForm
,
EditInterfaceForm
,
AddInterfaceForm
from
machines.forms
import
AliasForm
,
NewMachineForm
,
EditMachineForm
,
EditInterfaceForm
,
AddInterfaceForm
from
machines.views
import
free_ip
,
full_domain_validator
,
assign_ipv4
from
re2o.settings
import
ASSO_PSEUDO
,
PAGINATION_NUMBER
...
...
@@ -180,8 +180,8 @@ def edit_switch(request, switch_id):
new_interface
=
interface_form
.
save
(
commit
=
False
)
new_machine
=
machine_form
.
save
(
commit
=
False
)
new_switch
=
switch_form
.
save
(
commit
=
False
)
new_domain
=
domain
.
save
(
commit
=
False
)
if
full_domain_validator
(
request
,
new_
interface
):
new_domain
=
domain
_form
.
save
(
commit
=
False
)
if
full_domain_validator
(
request
,
new_
domain
):
with
transaction
.
atomic
(),
reversion
.
create_revision
():
new_machine
.
save
()
reversion
.
set_user
(
request
.
user
)
...
...
Write
Preview
Supports
Markdown
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