Skip to content

Commit

Permalink
Merge pull request #858 from rommapp/romm-852
Browse files Browse the repository at this point in the history
[ROMM-852] Purge platforms correctly on scan
  • Loading branch information
zurdi15 committed May 19, 2024
2 parents 1957942 + 7fbcc88 commit dd60cb6
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 dd60cb6

Please sign in to comment.