Commit cedc1785 authored by Christian Hesse's avatar Christian Hesse

dhcp-lease-comment: simplify array access

parent 07973066
......@@ -10,7 +10,7 @@
:local MacAddress [ / ip dhcp-server lease get $Lease mac-address ];
:local OldComment [ / ip dhcp-server lease get $Lease comment ];
:local NewComment;
:local AccessList [ :pick [ / caps-man access-list find where mac-address=$MacAddress ] 0 ];
:local AccessList ([ / caps-man access-list find where mac-address=$MacAddress ]->0);
:if ([ :len $AccessList ] > 0) do={
:set NewComment [ / caps-man access-list get $AccessList comment ];
}
......
......@@ -10,7 +10,7 @@
:local MacAddress [ / ip dhcp-server lease get $Lease mac-address ];
:local OldComment [ / ip dhcp-server lease get $Lease comment ];
:local NewComment;
:local AccessList [ :pick [ / interface wireless access-list find where mac-address=$MacAddress ] 0 ];
:local AccessList ([ / interface wireless access-list find where mac-address=$MacAddress ]->0);
:if ([ :len $AccessList ] > 0) do={
:set NewComment [ / interface wireless access-list get $AccessList comment ];
}
......
......@@ -11,7 +11,7 @@
:local MacAddress [ / ip dhcp-server lease get $Lease mac-address ];
:local OldComment [ / ip dhcp-server lease get $Lease comment ];
:local NewComment;
:local AccessList [ :pick [ / %PATH% access-list find where mac-address=$MacAddress ] 0 ];
:local AccessList ([ / %PATH% access-list find where mac-address=$MacAddress ]->0);
:if ([ :len $AccessList ] > 0) do={
:set NewComment [ / %PATH% access-list get $AccessList comment ];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment