mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-18 06:03:54 +03:00
Normalize OS name comparison in Transport model for case insensitivity
This commit is contained in:
parent
5a788e0ed5
commit
1962f1a55f
@ -150,7 +150,7 @@ class Transport(ManagedObjectModel, TaggingMixin):
|
|||||||
Returns:
|
Returns:
|
||||||
bool: True if this transport is valid for the specified OS, False otherwise
|
bool: True if this transport is valid for the specified OS, False otherwise
|
||||||
"""
|
"""
|
||||||
return not self.allowed_oss or os.name.lower() in str(self.allowed_oss.lower()).split(',')
|
return not self.allowed_oss or os.name.casefold() in str(self.allowed_oss.casefold()).split(',')
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f'{self.name} of type {self.data_type} (id:{self.id})'
|
return f'{self.name} of type {self.data_type} (id:{self.id})'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user