Skip to content

Commit

Permalink
hotfix_disable_biometrics_schema_for_all_programs
Browse files Browse the repository at this point in the history
  • Loading branch information
marekbiczysko committed Nov 4, 2024
1 parent 987532c commit c6b1e91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/hct_mis_api/apps/program/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c6b1e91

Please sign in to comment.