From c48063179d88bd1226302e583ffc42f21e84baad Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 7 Feb 2019 15:11:32 +0000 Subject: [PATCH] Fix device editing --- manager/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manager/views.py b/manager/views.py index f7a8b83..b5baf6a 100644 --- a/manager/views.py +++ b/manager/views.py @@ -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: