1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-12 09:17:56 +03:00

remove empty ips from phisical machines on save

This commit is contained in:
Adolfo Gómez García 2020-05-26 14:32:57 +02:00
parent 71d6e389ea
commit 36609eaff3

View File

@ -94,7 +94,7 @@ class IPMachinesService(IPServiceBase):
if values.get('ipList', None) is None:
self._ips = []
else:
self._ips = list('{}~{}'.format(str(ip).strip(), i) for i, ip in enumerate(values['ipList'])) # Allow duplicates right now
self._ips = ['{}~{}'.format(str(ip).strip(), i) for i, ip in enumerate(values['ipList']) if str(ip).strip()] # Allow duplicates right now
# self._ips.sort()
self._token = self.token.value.strip()