Skip to content

Commit

Permalink
style fixes by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Smartappli authored and github-actions[bot] committed Aug 1, 2024
1 parent 594e05e commit bf243fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/syft/src/syft/service/user/user_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,13 +493,13 @@ def update(

immutable_fields = {"created_date", "updated_date", "deleted_date"}
updated_fields = user_update.to_dict(
exclude_none=True, exclude_empty=True
exclude_none=True, exclude_empty=True,
).keys()

for field_name in immutable_fields:
if field_name in updated_fields:
return SyftError(
message=f"You are not allowed to modify '{field_name}'."
message=f"You are not allowed to modify '{field_name}'.",
)

if user_update.name is not Empty and user_update.name.strip() == "": # type: ignore[comparison-overlap]
Expand Down

0 comments on commit bf243fb

Please sign in to comment.