Skip to content

Commit

Permalink
group individual related_name
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Oct 23, 2024
1 parent 296a13b commit 1dfba72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions social_protection/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def resolve_benefit_plan(self, info, **kwargs):
if individual_id:
filters.append(Q(
Q(beneficiary__individual__id=individual_id) |
Q(groupbeneficiary__group__groupindividual__individual__id=individual_id)
Q(groupbeneficiary__group__groupindividuals__individual__id=individual_id)
))

group_id = kwargs.get("group_id", None)
Expand Down Expand Up @@ -298,7 +298,7 @@ def _apply_custom_filters(query, **kwargs):
Query.object_type,
custom_filters,
query,
"group__groupindividual__individual",
"group__groupindividuals__individual",
)
return query

Expand All @@ -323,7 +323,7 @@ def _get_eligible_group_uuids(query, info, **kwargs):
Query.object_type,
eligibility_filters,
query,
"group__groupindividual__individual",
"group__groupindividuals__individual",
)
eligible_group_beneficiaries = gql_optimizer.query(query_eligible, info)
eligible_group_uuids = set(eligible_group_beneficiaries.values_list('uuid', flat=True))
Expand Down

0 comments on commit 1dfba72

Please sign in to comment.