mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-10 01:17:59 +03:00
Fixed notify action
This commit is contained in:
parent
3898cf7253
commit
159414f8e4
@ -761,7 +761,7 @@ class Unmanaged(ActorV3Action):
|
|||||||
# Try to infer the ip from the valid id (that could be an IP or a MAC)
|
# Try to infer the ip from the valid id (that could be an IP or a MAC)
|
||||||
ip: str
|
ip: str
|
||||||
try:
|
try:
|
||||||
ip = next(x['ip'] for x in self._params['id'] if x['ip'] == validId or x['mac'] == validId)
|
ip = next(x['ip'] for x in self._params['id'] if validId in (x['ip'], x['mac']))
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
ip = self._params['id'][0]['ip'] # Get first IP if no valid ip found
|
ip = self._params['id'][0]['ip'] # Get first IP if no valid ip found
|
||||||
|
|
||||||
@ -813,7 +813,7 @@ class Notify(ActorV3Action):
|
|||||||
try:
|
try:
|
||||||
# Check block manually
|
# Check block manually
|
||||||
checkBlockedIp(self._request) # pylint: disable=protected-access
|
checkBlockedIp(self._request) # pylint: disable=protected-access
|
||||||
if 'action' == 'login':
|
if self._params['action'] == 'login':
|
||||||
Login.action(typing.cast(Login, self))
|
Login.action(typing.cast(Login, self))
|
||||||
else:
|
else:
|
||||||
Logout.action(typing.cast(Logout, self))
|
Logout.action(typing.cast(Logout, self))
|
||||||
|
Loading…
Reference in New Issue
Block a user