Skip to content

Commit

Permalink
fix: always allow __typename in all AllowedDataFieldsMixin models
Browse files Browse the repository at this point in the history
Refs: HP-2469
  • Loading branch information
danipran committed Sep 5, 2024
1 parent 327bbfa commit 3e0de6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions profiles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AllowedDataFieldsMixin:
"""

allowed_data_fields_map = {}
always_allow_fields = ["id", "service_connections"]
always_allow_fields = ["__typename", "id", "service_connections"]
check_allowed_data_fields = True

@classmethod
Expand Down Expand Up @@ -120,7 +120,6 @@ class Meta:
"language",
"contact_method",
"login_methods",
"__typename",
]

def resolve_profile(self):
Expand Down
1 change: 1 addition & 0 deletions profiles/tests/test_gql_my_profile_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def test_my_profile_always_allowed_fields(user_gql_client, service):
__typename
id
verifiedPersonalInformation {
__typename
firstName
}
serviceConnections {
Expand Down

0 comments on commit 3e0de6b

Please sign in to comment.