From 9ac7dfe452d6ccffbe49e9df53977d62dcb98934 Mon Sep 17 00:00:00 2001 From: FC Stegerman Date: Thu, 1 Jun 2023 20:23:00 +0200 Subject: [PATCH] update: fix regression for ArchivePolicy: 0 * https://gitlab.com/fdroid/fdroidserver/-/merge_requests/920#note_1413338920 * https://gitlab.com/fdroid/fdroidserver/-/merge_requests/920#note_1413344025 --- fdroidserver/update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 1fb020ea..86070c67 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -176,7 +176,7 @@ def status_update_json(apps, apks): validapks = 0 if app.get('Disabled'): output['disabled'].append(appid) - elif app["ArchivePolicy"] == 0: + elif app.get("ArchivePolicy") == 0: output['archivePolicy0'].append(appid) else: for build in app.get('Builds', []): @@ -1876,7 +1876,7 @@ def archive_old_apks(apps, apks, archapks, repodir, archivedir, defaultkeepversi for appid, app in apps.items(): - if app.get('ArchivePolicy'): + if app.get('ArchivePolicy') is not None: keepversions = app['ArchivePolicy'] else: keepversions = defaultkeepversions