Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cove/cove_360/templates/cove_360/validation_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>{{ error.schema_title }}</h4>
</td>
<td style="text-align: center">
{{error_extra.values|length}} <br />
{% if error_extra.values|length > 3 %}
{% if error_extra.values|length >= 1 %}
{% if error_prefix %}
<button class="button button--small" data-toggle="modal" data-target-class="{{"validation-errors-"|concat:error_prefix|concat:forloop.counter}}">
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion lib360dataquality/cove/threesixtygiving.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def group_validation_errors(validation_errors, file_type, openpyxl_workbook):
"spreadsheet_style_errors_table": spreadsheet_style_errors_table(
values, openpyxl_workbook
)
if (file_type in ["xlsx", "csv"] and "grants/" in error["path_no_number"])
if (file_type in ["xlsx", "csv"] and error["path_no_number"].split("/")[0] == "grants")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that all instances of error["path_no_number"] start with grants/? This change will mean that anything with, for example, hello/grants will not satisfy this change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisarridge Will the error["path_no_number"] not always be something like grants/fundingOrganization or grants as per https://github.com/ThreeSixtyGiving/standard/blob/main/schema/360-giving-package-schema.json? I think the logic was failing previously as "grants/" in error["path_no_number"]) was failing to match against just grants.

@jwilson232 jwilson232 Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could switch the logic to .contains("grants") or .startswith("grants) but not sure if that is correct?

else None,
}
if error["validator"] == "required":
Expand Down
Loading