Skip to content

Commit

Permalink
Merge pull request #533 from GovDataOfficial/fix-harvest-error-dictiz…
Browse files Browse the repository at this point in the history
…ation

Adapt template to latest changes in harvest job error dictization
  • Loading branch information
amercader committed Jun 1, 2023
2 parents b244216 + ec57de3 commit 02aeaf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckanext/harvest/templates/snippets/job_error_summary.html
@@ -1,7 +1,7 @@
{#
Displays a table with a summary of the most common errors for a job

error_summary - List of tuples with (message, count)
error_summary - List of dicts with message and error_count

Example:

Expand All @@ -22,8 +22,8 @@
<tbody>
{% for error in summary %}
<tr>
<td class="count">{{ error[1] }}</td>
<td>{{ error[0] }}</td>
<td class="count">{{ error["error_count"] }}</td>
<td>{{ error["message"] }}</td>
</tr>
{% endfor %}
</tbody>
Expand Down
2 changes: 2 additions & 0 deletions ckanext/harvest/tests/test_action.py
Expand Up @@ -783,5 +783,7 @@ def test_harvest_source_show_status(self):
assert last_job['stats']['errored'] == 2
assert len(last_job['object_error_summary']) == 1
assert last_job['object_error_summary'][0]['message'] == harvest_object_error.message
assert last_job['object_error_summary'][0]['error_count'] == 1
assert len(last_job['gather_error_summary']) == 1
assert last_job['gather_error_summary'][0]['message'] == harvest_gather_error.message
assert last_job['gather_error_summary'][0]['error_count'] == 1

0 comments on commit 02aeaf4

Please sign in to comment.