Skip to content

Commit

Permalink
Remove locales, before adding new ones
Browse files Browse the repository at this point in the history
We've kept translations around forever for each app, this causes issues.
  • Loading branch information
razzeee committed Sep 21, 2024
1 parent 21199e8 commit 35571d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/app/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def load_appstream(sqldb) -> None:
"type": type,
}
)

for key in p.scan_iter(f"apps_locale:{app_id}:*"):
p.delete(key)

for locale, value in apps_locale.items():
if app_id in value:
p.set(f"apps_locale:{app_id}:{locale}", json.dumps(value[app_id]))
Expand All @@ -171,6 +175,7 @@ def load_appstream(sqldb) -> None:

search.delete_apps(apps_to_delete_from_search)

print("execute")
p.execute()


Expand Down

0 comments on commit 35571d3

Please sign in to comment.