From e815256b22e59b051f1338fbf183f550a9783cc2 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 25 Aug 2018 21:47:45 -0400 Subject: [PATCH] backups: Include app versions in manifest file Signed-off-by: James Valleroy Reviewed-by: Joseph Nuthalapati --- plinth/modules/backups/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plinth/modules/backups/__init__.py b/plinth/modules/backups/__init__.py index c6dbed236..2a9147bd0 100644 --- a/plinth/modules/backups/__init__.py +++ b/plinth/modules/backups/__init__.py @@ -77,7 +77,11 @@ def _backup_handler(packet): os.makedirs(MANIFESTS_FOLDER) manifest_path = MANIFESTS_FOLDER + packet.label + '.json' - manifests = {x[0]: x[2] for x in packet.manifests} + manifests = [{ + 'name': x[0], + 'version': x[1].version, + 'backup': x[2] + } for x in packet.manifests] with open(manifest_path, 'w') as manifest_file: json.dump(manifests, manifest_file)