From c6b1e910442e92521c343d273828977d777ed60a Mon Sep 17 00:00:00 2001 From: marekbiczysko Date: Mon, 4 Nov 2024 14:22:09 +0100 Subject: [PATCH] hotfix_disable_biometrics_schema_for_all_programs --- src/hct_mis_api/apps/program/schema.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hct_mis_api/apps/program/schema.py b/src/hct_mis_api/apps/program/schema.py index 2127c6070d..94199ea827 100644 --- a/src/hct_mis_api/apps/program/schema.py +++ b/src/hct_mis_api/apps/program/schema.py @@ -262,11 +262,17 @@ class Query(graphene.ObjectType): def resolve_can_run_deduplication(self, info: Any, **kwargs: Any) -> bool: encoded_program_id = info.context.headers.get("Program") + if encoded_program_id == "all": + return False + program = Program.objects.only("biometric_deduplication_enabled").get(id=decode_id_string(encoded_program_id)) return program.biometric_deduplication_enabled def resolve_is_deduplication_disabled(self, info: Any, **kwargs: Any) -> bool: encoded_program_id = info.context.headers.get("Program") + if encoded_program_id == "all": + return False + program = Program.objects.only("id").get(id=decode_id_string(encoded_program_id)) # deduplication engine in progress is_still_processing = RegistrationDataImport.objects.filter(