Skip to content

Commit

Permalink
My hate for sqlalchemy knows no bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
rknop committed Jul 18, 2024
1 parent 5fe1f34 commit 1cbf1b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,8 @@ def delete_from_disk_and_database(
d.delete_from_disk_and_database( session=session, commit=commit,
remove_folders=remove_folders, archive=archive,
remove_downstreams=True )
else:
raise RuntimeError( f"A {self.__class__} isn't able to remove a downstream {d.__class__}" )


if archive:
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/ptf.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def ptf_aligned_images(request, ptf_cache_dir, data_dir, code_version):
message=r'.*DELETE statement on table .* expected to delete \d* row\(s\).*',
)
for image in ptf_reference_images:
image = safe_merge( session, image )
# image = merge( session, image )
image.exposure.delete_from_disk_and_database(commit=False, session=session, remove_downstreams=True)
# image.delete_from_disk_and_database(commit=False, session=session, remove_downstreams=True)
session.commit()
Expand Down

0 comments on commit 1cbf1b6

Please sign in to comment.