Skip to content

Commit

Permalink
Merge pull request #154 from openimis/feature/wait-for-mutation
Browse files Browse the repository at this point in the history
Feature/wait for mutation
  • Loading branch information
dragos-dobre authored Nov 8, 2024
2 parents 08e3799 + f7760ec commit 749fe2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions insuree/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from claim.apps import ClaimConfig
from core.gql.export_mixin import ExportableQueryMixin
from core.schema import signal_mutation_module_validate
from core.services import wait_for_mutation
from core.utils import filter_validity
from django.db.models import Q
from django.core.exceptions import PermissionDenied
Expand Down Expand Up @@ -181,6 +182,7 @@ def resolve_insurees(self, info, **kwargs):
filters += filter_validity(**kwargs)
client_mutation_id = kwargs.get("client_mutation_id", None)
if client_mutation_id:
wait_for_mutation(client_mutation_id)
filters.append(
Q(mutations__mutation__client_mutation_id=client_mutation_id))
parent_location = kwargs.get('parent_location')
Expand Down Expand Up @@ -270,6 +272,7 @@ def resolve_families(self, info, **kwargs):
filters += filter_validity(**kwargs)
client_mutation_id = kwargs.get("client_mutation_id", None)
if client_mutation_id:
wait_for_mutation(client_mutation_id)
filters.append(
Q(mutations__mutation__client_mutation_id=client_mutation_id))
parent_location = kwargs.get('parent_location')
Expand Down

0 comments on commit 749fe2f

Please sign in to comment.