Skip to content

Commit 163a9ea

Browse files
committed
feat(restapi): relax resource existence requirement on child snapshots
1 parent c0074c2 commit 163a9ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dioptra/restapi/db/repository/utils/resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def get_latest_child_snapshots(
267267
EntityDeletedError: if parent is deleted
268268
"""
269269

270-
assert_resource_exists(session, parent, DeletionPolicy.NOT_DELETED)
270+
assert_resource_exists(session, parent, deletion_policy=deletion_policy)
271271

272272
child_resources: Sequence[m.Resource | int]
273273
if isinstance(parent, (m.Resource, m.ResourceSnapshot)):

src/dioptra/restapi/v1/experiments/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def get(
260260

261261
entrypoints = self._uow.experiment_repo.get_entrypoints(
262262
experiment,
263-
DeletionPolicy.NOT_DELETED,
263+
deletion_policy=DeletionPolicy.ANY,
264264
)
265265

266266
has_draft = self._uow.drafts_repo.has_draft_modification(

0 commit comments

Comments
 (0)