mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
MCS cert identified by evidence_category in get_core_file_type 🟩
This commit is contained in:
parent
1af1d4a82c
commit
e18c300deb
1 changed files with 4 additions and 1 deletions
|
|
@ -40,6 +40,9 @@ _CORE_FILE_TO_FILE_TYPE: dict[CoreFiles, str] = {
|
|||
def get_core_file_type(
|
||||
filename: str, evidence_category: Optional[str] = None
|
||||
) -> Optional[CoreFiles]:
|
||||
if evidence_category is not None and evidence_category.lower() == "mcs compliance certificate":
|
||||
return CoreFiles.MCS_CERTIFICATE
|
||||
|
||||
# Identify retrofit design doc using evidence category as the name is possibly unreliable.
|
||||
# We might change to always use evidence category, but needs more investigation
|
||||
if evidence_category is not None and evidence_category.lower() == "retrofit design":
|
||||
|
|
@ -74,7 +77,7 @@ def get_core_file_type(
|
|||
def get_file_type_string(
|
||||
filename: str, evidence_category: Optional[str] = None
|
||||
) -> Optional[str]:
|
||||
core_file: Optional[CoreFiles] = get_core_file_type(filename)
|
||||
core_file: Optional[CoreFiles] = get_core_file_type(filename, evidence_category)
|
||||
|
||||
if core_file is None:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue