Skip to content

Commit

Permalink
summary: Replace current_apps query with apps.get_app_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
barthalion committed Sep 11, 2024
1 parent a9f8eb6 commit c41137c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions backend/app/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import gi

from . import config, configParserCustom, db, models, search, utils
from . import apps, config, configParserCustom, db, models, search, utils

gi.require_version("OSTree", "1.0")
from gi.repository import Gio, GLib, OSTree
Expand Down Expand Up @@ -176,12 +176,7 @@ def parse_summary(summary, sqldb):


def update(sqldb) -> None:
current_apps = set(
app.app_id
for app in sqldb.session.query(models.Apps.app_id)
.filter(models.Apps.type.in_(["desktop-application", "console-application"]))
.all()
)
current_apps = set(apps.get_appids())

repo_file = Gio.File.new_for_path(f"{config.settings.flatpak_user_dir}/repo")
repo = OSTree.Repo.new(repo_file)
Expand Down

0 comments on commit c41137c

Please sign in to comment.