|
|
|
@ -15,7 +15,7 @@ class LicenseValidator: |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
@property |
|
|
|
def computed_licence_id(self) -> str: |
|
|
|
def computed_licence_id(self) -> str: |
|
|
|
return f"{self.stripped_license}{self.computed_license_key.upper()}" |
|
|
|
return f"{self.stripped_license}{self.computed_license_key}".upper() |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
@property |
|
|
|
def computed_license_key(self) -> str: |
|
|
|
def computed_license_key(self) -> str: |
|
|
|
@ -45,4 +45,4 @@ class LicenseValidator: |
|
|
|
given_letter = self.license_id[-1] |
|
|
|
given_letter = self.license_id[-1] |
|
|
|
|
|
|
|
|
|
|
|
# Verify that the last character matches the computed license key |
|
|
|
# Verify that the last character matches the computed license key |
|
|
|
return self.computed_licence_id == numeric_part + given_letter |
|
|
|
return self.computed_licence_id == numeric_part + given_letter.upper() |
|
|
|
|