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

Fixed OSS

This commit is contained in:
Adolfo Gómez García 2022-03-15 20:22:13 +01:00
parent 2b33ffc656
commit 282495ce0f

View File

@ -129,7 +129,7 @@ class Transport(ManagedObjectModel, TaggingMixin):
return self.networks.filter(net_start__lte=ip, net_end__gte=ip).count() == 0
def validForOs(self, os: 'KnownOS') -> bool:
return os.name in self.allowed_oss.split(',')
return not self.allowed_oss or os.name in self.allowed_oss.split(',')
def __str__(self) -> str:
return '{} of type {} (id:{})'.format(self.name, self.data_type, self.id)