File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
src/layers/domain/core/cpm_system_id Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 1010from domain .core .base import BaseModel
1111from domain .core .error import InvalidKeyPattern
1212from domain .core .product_key import ProductKeyType
13+ from domain .core .product_team_key import validate_key
1314from event .json import json_load
1415from pydantic import validator
1516
3334)
3435
3536
36- def validate_key (key_value : str , key_type : ProductKeyType ):
37- if key_type and key_type .pattern .match (key_value ) is None :
38- raise InvalidKeyPattern (
39- f"Key '{ key_value } ' does not match the expected "
40- f"pattern '{ key_type .pattern .pattern } ' associated with "
41- f"key type '{ key_type } '"
42- )
43- return key_value
44-
45-
4637@cache
4738def _load_existing_ids ():
4839 if os .path .exists (PRODUCT_IDS_GENERATED_FILE ):
You can’t perform that action at this time.
0 commit comments