Skip to content

Commit 0ff6efc

Browse files
author
Agathe Guillemot
committed
Retrieve id properly
1 parent 89f4e8d commit 0ff6efc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dataikuapi/dss/apideployer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def list_deployments(self):
267267
:returns: a list of deployments
268268
:rtype: list of :class:`dataikuapi.dss.apideployer.DSSAPIDeployerDeployment`
269269
"""
270-
return [DSSAPIDeployerDeployment(self.client, deployment.id) for deployment in self.light_status["deployments"]]
270+
return [DSSAPIDeployerDeployment(self.client, deployment["id"]) for deployment in self.light_status["deployments"]]
271271

272272
def get_raw(self):
273273
"""

dataikuapi/dss/projectdeployer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def list_deployments(self):
265265
:returns: a list of deployments
266266
:rtype: list of :class:`dataikuapi.dss.projectdeployer.DSSProjectDeployerDeployment`
267267
"""
268-
return [DSSProjectDeployerDeployment(self.client, deployment.id) for deployment in self.light_status["deployments"]]
268+
return [DSSProjectDeployerDeployment(self.client, deployment["id"]) for deployment in self.light_status["deployments"]]
269269

270270
def get_raw(self):
271271
"""
@@ -531,8 +531,8 @@ def list_deployments(self, infra_id=None):
531531
:rtype: list of :class:`dataikuapi.dss.projectdeployer.DSSProjectDeployerDeployment`
532532
"""
533533
if infra_id is None:
534-
return [DSSProjectDeployerDeployment(self.client, deployment.id) for deployment in self.light_status["deployments"]]
535-
return [DSSProjectDeployerDeployment(self.client, deployment.id) for deployment in self.light_status["deployments"] if infra_id == deployment.infraId]
534+
return [DSSProjectDeployerDeployment(self.client, deployment["id"]) for deployment in self.light_status["deployments"]]
535+
return [DSSProjectDeployerDeployment(self.client, deployment["id"]) for deployment in self.light_status["deployments"] if infra_id == deployment.infraId]
536536

537537
def get_bundles(self):
538538
"""

0 commit comments

Comments
 (0)