Skip to content

Commit

Permalink
Fix PARTIAL_UPDATE_ID workaround
Browse files Browse the repository at this point in the history
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes #529

(cherry picked from commit eabe014)
  • Loading branch information
mdellweg committed Jul 15, 2022
1 parent 0ba4d11 commit 7a2028f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/529.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed the heuristics for the `PARTIAL_UPDATE_ID` workaround.
2 changes: 1 addition & 1 deletion pulpcore/cli/common/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def update(
non_blocking: bool = False,
) -> Any:
# Workaround for plugins that do not have ID_PREFIX in place
if not hasattr(self, "ID_PREFIX") and not hasattr(self, "PARTIAL_UPDATE_ID"):
if hasattr(self, "UPDATE_ID") and not hasattr(self, "PARTIAL_UPDATE_ID"):
self.PARTIAL_UPDATE_ID = getattr(self, "UPDATE_ID")
# ----------------------------------------------------------
_parameters = {self.HREF: href}
Expand Down
2 changes: 1 addition & 1 deletion pulpcore/cli/common/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
):
if not validate_certs:
# types-urllib3 does not cover that function
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # type:ignore
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

self.debug_callback: Callable[[int, str], Any] = debug_callback or (lambda i, x: None)
self.base_url: str = base_url
Expand Down

0 comments on commit 7a2028f

Please sign in to comment.