1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-21 09:34:08 +03:00

Normalize OS name comparison in Transport model for case insensitivity

This commit is contained in:
Adolfo Gómez García 2024-12-19 16:19:45 +01:00
parent 5a788e0ed5
commit 1962f1a55f
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -150,7 +150,7 @@ class Transport(ManagedObjectModel, TaggingMixin):
Returns:
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:
return f'{self.name} of type {self.data_type} (id:{self.id})'