Inject the database version when downloading it
This commit is contained in:
parent
b475bfe8d4
commit
0e977fd01d
@ -155,8 +155,9 @@ def download_database() -> Response:
|
|||||||
return send_file(
|
return send_file(
|
||||||
current_app.config['DATABASE_PATH'],
|
current_app.config['DATABASE_PATH'],
|
||||||
as_attachment=True,
|
as_attachment=True,
|
||||||
download_name='{name}-{timestamp}{extension}'.format(
|
download_name='{name}-v{version}-{timestamp}{extension}'.format(
|
||||||
name=name,
|
name=name,
|
||||||
|
version=BrickSQL(failsafe=True).version,
|
||||||
timestamp=datetime.now().astimezone(g.timezone).strftime(
|
timestamp=datetime.now().astimezone(g.timezone).strftime(
|
||||||
current_app.config['DATABASE_TIMESTAMP_FORMAT']
|
current_app.config['DATABASE_TIMESTAMP_FORMAT']
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user