File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
lambdas/filenameprocessor/src Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1717
1818VACCINE_TYPE_TO_DISEASES_HASH_KEY = "vacc_to_diseases"
1919ODS_CODE_TO_SUPPLIER_SYSTEM_HASH_KEY = "ods_code_to_supplier"
20+ EXTENDED_ATTRIBUTES_PREFIXES = "Vaccination_Extended_Attributes"
2021
2122ERROR_TYPE_TO_STATUS_CODE_MAP = {
2223 VaccineTypePermissionsError : 403 ,
Original file line number Diff line number Diff line change 1616from common .models .errors import UnhandledAuditTableError
1717from constants import (
1818 ERROR_TYPE_TO_STATUS_CODE_MAP ,
19+ EXTENDED_ATTRIBUTES_PREFIXES ,
1920 SOURCE_BUCKET_NAME ,
2021 FileNotProcessedReason ,
2122 FileStatus ,
@@ -76,9 +77,11 @@ def handle_record(record) -> dict:
7677 message_id = str (uuid4 ())
7778 s3_response = get_s3_client ().get_object (Bucket = bucket_name , Key = file_key )
7879 created_at_formatted_string , expiry_timestamp = get_creation_and_expiry_times (s3_response )
79-
80- vaccine_type , supplier = validate_file_key (file_key )
81- permissions = validate_vaccine_type_permissions (vaccine_type = vaccine_type , supplier = supplier )
80+ if file_key .startswith (tuple (EXTENDED_ATTRIBUTES_PREFIXES )):
81+ pass
82+ else :
83+ vaccine_type , supplier = validate_file_key (file_key )
84+ permissions = validate_vaccine_type_permissions (vaccine_type = vaccine_type , supplier = supplier )
8285
8386 queue_name = f"{ supplier } _{ vaccine_type } "
8487 upsert_audit_table (
You can’t perform that action at this time.
0 commit comments