Fix device editing
This commit is contained in:
parent
6d4e69cb41
commit
c48063179d
1 changed files with 2 additions and 2 deletions
|
@ -135,10 +135,10 @@ def editdevice(request, device_id):
|
|||
if request.POST.get("subnet", ""):
|
||||
subnet = Network.objects.get(intip=request.POST.get("subnet", device.network.intip if device.network else "No VPN"))
|
||||
|
||||
if subnet[0] in subnets:
|
||||
if subnet in subnets:
|
||||
newname = request.POST.get("name", "")
|
||||
if newname != device.name:
|
||||
sigRenameDevice(device.serial, request.user.username, device[0].name, newname)
|
||||
sigRenameDevice(device.serial, request.user.username, device.name, newname)
|
||||
device.name = newname
|
||||
|
||||
if subnet != device.network:
|
||||
|
|
Loading…
Reference in a new issue