Skip to content

Commit

Permalink
chore: rename duplication_action "replace" to "overwrite"
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6f677548 committed Oct 27, 2023
1 parent 3916730 commit cffb060
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/ca_pwt/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
help="Indicates if not found errors should be ignored when exporting groups",
)

_allow_duplicates_option = click.option(
"--allow_duplicates",
is_flag=True,
default=False,
help="Indicates if duplicates should be allowed and imported. "
"Duplicates are checked by comparing the displayName of Policies/Groups",
)

_duplicate_action_option = click.option(
"--duplicate_action",
Expand Down
4 changes: 2 additions & 2 deletions src/ca_pwt/helpers/graph_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class DuplicateActionEnum(StrEnum):
IGNORE = "ignore"
REPLACE = "replace"
OVERWRITE = "overwrite"
DUPLICATE = "duplicate"
FAIL = "fail"

Expand Down Expand Up @@ -220,7 +220,7 @@ def create_checking_duplicates(
f"Entity {self._get_entity_path()} with filter {odata_filter} already exists. Skipping..."
)
return existing_entity
elif duplicate_action == DuplicateActionEnum.REPLACE:
elif duplicate_action == DuplicateActionEnum.OVERWRITE:
existing_entity_id = existing_entity.json()["id"]
self._logger.warning(f"Replacing entity {self._get_entity_path()} with id {existing_entity_id}...")
response = self.update(existing_entity_id, entity)
Expand Down

0 comments on commit cffb060

Please sign in to comment.