From 0e977fd01d4baa8de36d67923388474e5e500dca Mon Sep 17 00:00:00 2001 From: Gregoo Date: Wed, 22 Jan 2025 11:53:11 +0100 Subject: [PATCH] Inject the database version when downloading it --- bricktracker/views/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bricktracker/views/admin.py b/bricktracker/views/admin.py index 3546c98..a5eba0d 100644 --- a/bricktracker/views/admin.py +++ b/bricktracker/views/admin.py @@ -155,8 +155,9 @@ def download_database() -> Response: return send_file( current_app.config['DATABASE_PATH'], as_attachment=True, - download_name='{name}-{timestamp}{extension}'.format( + download_name='{name}-v{version}-{timestamp}{extension}'.format( name=name, + version=BrickSQL(failsafe=True).version, timestamp=datetime.now().astimezone(g.timezone).strftime( current_app.config['DATABASE_TIMESTAMP_FORMAT'] ),