This commit is contained in:
Kenneth Kehl
2025-01-16 12:00:15 -08:00
parent 92935867ea
commit e600087266
7 changed files with 76 additions and 16 deletions

View File

@@ -28,6 +28,10 @@ class CsvFileValidator:
self.message = message
def __call__(self, form, field):
if not Spreadsheet.approves_headers(field.data):
raise ValidationError(
f"{field.data.filename} does not have headers in row 1"
)
if not Spreadsheet.can_handle(field.data.filename):
raise ValidationError(
"{} is not a spreadsheet that Notify can read".format(

View File

@@ -32,11 +32,7 @@ def check_feature_flags():
@main.route("/test/feature-flags")
def test_feature_flags():
return jsonify(
{
"FEATURE_ABOUT_PAGE_ENABLED": current_app.config[
"FEATURE_ABOUT_PAGE_ENABLED"
]
}
{"FEATURE_ABOUT_PAGE_ENABLED": current_app.config["FEATURE_ABOUT_PAGE_ENABLED"]}
)
@@ -235,7 +231,6 @@ def contact():
return render_template(
"views/contact.html",
navigation_links=about_notify_nav(),
)
@@ -268,7 +263,6 @@ def join_notify():
return render_template(
"views/join-notify.html",
navigation_links=about_notify_nav(),
)