Skip to content

Commit 79c8d70

Browse files
committed
Revert changes to v0 api
1 parent 2de9faa commit 79c8d70

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

rsconnect/api.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -419,17 +419,10 @@ def app_add_environment_vars(self, app_guid: str, env_vars: list[tuple[str, str]
419419
env_body = [dict(name=kv[0], value=kv[1]) for kv in env_vars]
420420
return self.patch("v1/content/%s/environment" % app_guid, body=env_body)
421421

422-
def app_deploy(self, app_id: str, bundle_id: Optional[int] = None, activate: bool = True) -> TaskStatusV0:
423-
body = {"bundle": bundle_id}
424-
if not activate:
425-
# The default behavior is to activate the app after deployment.
426-
# So we only pass the parameter if we want to deactivate it.
427-
# That way we can keep the API backwards compatible.
428-
body["activate"] = False
429-
422+
def app_deploy(self, app_id: str, bundle_id: Optional[int] = None) -> TaskStatusV0:
430423
response = cast(
431424
Union[TaskStatusV0, HTTPResponse],
432-
self.post("applications/%s/deploy" % app_id, body=body),
425+
self.post("applications/%s/deploy" % app_id, body={"bundle": bundle_id}),
433426
)
434427
response = self._server.handle_bad_response(response)
435428
return response

0 commit comments

Comments
 (0)