From d0377ed41932d87bd8685b76cfe5e189a95d788e Mon Sep 17 00:00:00 2001 From: bashmak Date: Wed, 14 Jun 2017 16:00:00 +0300 Subject: [PATCH] =?UTF-8?q?FIXBUG:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D0=BC=20ip=20=D0=B2=20nas=20=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=BA=D0=BE=D0=B3=D0=B4=D0=B0=20=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=20?= =?UTF-8?q?=D0=BA=20=D0=B8=D0=BD=D0=B5=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/commands/dhcp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agent/commands/dhcp.py b/agent/commands/dhcp.py index 2eaf084..e2fc4be 100644 --- a/agent/commands/dhcp.py +++ b/agent/commands/dhcp.py @@ -22,6 +22,8 @@ def dhcp_commit(client_ip, client_mac, switch_mac, switch_port): return try: abon = Abon.objects.get(opt82=opt82) + if not abon.is_access(): + return abon.ip_address = client_ip abon.is_dhcp = True abon.save(update_fields=['ip_address'])