Skip to content

Commit cb30bd3

Browse files
Merge pull request #209 from NHSDigital/disable-downloads
Remove aggregate download capability from reporting
2 parents f7461e3 + 8783a77 commit cb30bd3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

mavis/reporting/forms/data_type_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ class DataTypeForm(FlaskForm):
1616
validators=[InputRequired(message="Select which data you want to download")],
1717
choices=[
1818
(CHILD_RECORDS, "Child-level vaccination data"),
19-
(AGGREGATE_DATA, "Aggregate vaccination data"),
19+
# (AGGREGATE_DATA, "Aggregate vaccination data"),
2020
],
2121
)

mavis/reporting/templates/start-download.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
{% set _ = items.append({
2929
"value": choice[0],
3030
"text": choice[1],
31+
"checked": choice[0] == "child-records",
3132
}) %}
3233
{% endfor %}
3334

mavis/reporting/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from flask import (
44
Blueprint,
55
Response,
6+
abort,
67
current_app,
78
g,
89
redirect,
@@ -71,7 +72,8 @@ def start_download(workgroup):
7172
if form.data_type.data == DataTypeForm.CHILD_RECORDS:
7273
return redirect(mavis_helper.mavis_public_url(current_app, "/programmes"))
7374
elif form.data_type.data == DataTypeForm.AGGREGATE_DATA:
74-
return redirect(url_for("main.download", workgroup=team.workgroup))
75+
raise ValueError("Invalid data type")
76+
# return redirect(url_for("main.download", workgroup=team.workgroup))
7577
else:
7678
raise ValueError("Invalid data type")
7779

@@ -97,6 +99,8 @@ def start_download(workgroup):
9799
@main.route("/team/<workgroup>/download", methods=["GET", "POST"])
98100
@auth_helper.login_required
99101
def download(workgroup):
102+
abort(404)
103+
100104
team = Team.get_from_session(session)
101105
if team.workgroup != workgroup:
102106
return redirect(url_for("main.download", workgroup=team.workgroup))

0 commit comments

Comments
 (0)