Skip to content

Commit

Permalink
fix use of lstrip to removeprefix
Browse files Browse the repository at this point in the history
  • Loading branch information
omer9564 committed Oct 29, 2024
1 parent 565509a commit aa9bac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions horizon/data_manager/update_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _get_operations_for_update_relationship_tuple(
),
)
for full_relation, targets in data.items():
relation = full_relation.lstrip("relation:")
relation = full_relation.removeprefix("relation:")
for target_type, target_objects in targets.items():
for target in target_objects:
yield InsertOperation(
Expand All @@ -39,7 +39,7 @@ def _get_operations_for_update_relationship_tuple(
def _get_operations_for_update_role_assigment(
full_user_key: str, data: JsonableValue
) -> Iterator[AnyOperation]:
user_key = full_user_key.lstrip("user:")
user_key = full_user_key.removeprefix("user:")
yield DeleteOperation(
fact=Fact(
type="role_assignments",
Expand Down

0 comments on commit aa9bac6

Please sign in to comment.