Skip to content

Commit

Permalink
Prevent label from being changed
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazoyer committed Jan 15, 2025
1 parent d9452a2 commit 4ee3188
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/infrahub/graphql/mutations/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class InfrahubAccountTokenDeleteInput(InputObjectType):

class InfrahubAccountUpdateSelfInput(InputObjectType):
password = InputField(String(required=False), description="Password to use instead of the current one")
label = InputField(String(required=False), description="Label to use instead of the current one")
description = InputField(String(required=False), description="Description to use instead of the current one")


Expand Down Expand Up @@ -133,7 +132,7 @@ async def delete_token(
async def update_self(
cls, db: InfrahubDatabase, account: CoreNode, data: dict[str, Any], info: GraphQLResolveInfo
) -> Self:
for field in ("password", "label", "description"):
for field in ("password", "description"):
if value := data.get(field):
getattr(account, field).value = value

Expand Down

0 comments on commit 4ee3188

Please sign in to comment.