do not clean ip from vlan if it is no assigned
This commit is contained in:
parent
6f3530095f
commit
40c20abddc
1 changed files with 5 additions and 3 deletions
|
@ -184,6 +184,8 @@ def remove(unit_id=0):
|
|||
try:
|
||||
#pubvlans depends on deploy as foreign key so delete them first
|
||||
for pubvlan in deploy.inv_pubvlans:
|
||||
#clean public addr assignment
|
||||
if pubvlan.pubaddr != None:
|
||||
pubvlan.pubaddr.pubvlan_id = None
|
||||
pubvlan.pubaddr.user_id = None
|
||||
db.session.commit()
|
||||
|
|
Loading…
Reference in a new issue