diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Hostbase/hostbase/views.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/Server/Hostbase/hostbase/views.py b/src/lib/Server/Hostbase/hostbase/views.py index 33ab276de..e8a204417 100644 --- a/src/lib/Server/Hostbase/hostbase/views.py +++ b/src/lib/Server/Hostbase/hostbase/views.py @@ -216,7 +216,7 @@ def edit(request, host_id): ips = IP.objects.filter(interface=inter.id) if inter.mac_addr != request.POST['mac_addr%d' % inter.id]: text = do_log(text, 'mac_addr', inter.mac_addr, request.POST['mac_addr%d' % inter.id]) - inter.mac_addr = request.POST['mac_addr%d' % inter.id].lower() + inter.mac_addr = request.POST['mac_addr%d' % inter.id].lower().replace('-',':') if inter.hdwr_type != request.POST['hdwr_type%d' % inter.id]: oldtype = inter.hdwr_type text = do_log(text, 'hdwr_type', oldtype, request.POST['hdwr_type%d' % inter.id]) @@ -276,7 +276,7 @@ def edit(request, host_id): inter.save() if request.POST['mac_addr_new']: new_inter = Interface(host=host, - mac_addr=request.POST['mac_addr_new'].lower(), + mac_addr=request.POST['mac_addr_new'].lower().replace('-',':'), hdwr_type=request.POST['hdwr_type_new'], dhcp=request.POST['dhcp_new']) text = do_log(text, '*new*', 'mac_addr', new_inter.mac_addr) @@ -585,7 +585,7 @@ def new(request): if request.POST['mac_addr_new']: new_inter = Interface(host=host, - mac_addr=request.POST['mac_addr_new'].lower(), + mac_addr=request.POST['mac_addr_new'].lower().replace('-',':'), hdwr_type=request.POST['hdwr_type_new'], dhcp=request.POST.has_key('dhcp_new')) new_inter.save() @@ -643,7 +643,7 @@ def new(request): name.mxs.add(mx) if request.POST['mac_addr_new2']: new_inter = Interface(host=host, - mac_addr=request.POST['mac_addr_new2'].lower(), + mac_addr=request.POST['mac_addr_new2'].lower().replace('-',':'), hdwr_type=request.POST['hdwr_type_new2'], dhcp=request.POST.has_key('dhcp_new2')) new_inter.save() @@ -749,7 +749,7 @@ def copy(request, host_id): if request.POST['mac_addr_new']: new_inter = Interface(host=host, - mac_addr=request.POST['mac_addr_new'].lower(), + mac_addr=request.POST['mac_addr_new'].lower().replace('-',':'), hdwr_type=request.POST['hdwr_type_new'], dhcp=request.POST.has_key('dhcp_new')) new_inter.save() @@ -807,7 +807,7 @@ def copy(request, host_id): name.mxs.add(mx) if request.POST['mac_addr_new2']: new_inter = Interface(host=host, - mac_addr=request.POST['mac_addr_new2'].lower(), + mac_addr=request.POST['mac_addr_new2'].lower().replace('-',':'), hdwr_type=request.POST['hdwr_type_new2'], dhcp=request.POST.has_key('dhcp_new2')) new_inter.save() |