Skip to content

Commit

Permalink
[ROMM-852] Purge platforms correctly on scan
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoine committed May 19, 2024
1 parent 1957942 commit 7fbcc88
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions backend/handler/database/platforms_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,5 @@ def purge_platforms(self, fs_platforms: list[str], session: Session = None):
return session.execute(
delete(Platform)
.where(or_(Platform.fs_slug.not_in(fs_platforms), Platform.slug.is_(None)))
.where(
select(func.count())
.select_from(Rom)
.filter_by(platform_id=Platform.id)
.as_scalar()
== 0
)
.execution_options(synchronize_session="fetch")
)

0 comments on commit 7fbcc88

Please sign in to comment.