diff --git a/app/routes.py b/app/routes.py index d37ff0d3..8a971033 100644 --- a/app/routes.py +++ b/app/routes.py @@ -475,11 +475,11 @@ def add_harvest_source(): @mod.route("/harvest_source/", methods=["GET"]) def view_harvest_source_data(source_id: str): source = db.get_harvest_source(source_id) - records = db.get_latest_harvest_records_by_source( - source_id=source.id, + records_count = db.get_latest_harvest_records_by_source_orm( + source_id=source.id, count=True ) summary_data = { - "records_count": len(records), + "records_count": records_count, "last_job_errors": "N/A", "last_job_finished": "N/A", "next_job_scheduled": "N/A", diff --git a/tests/badges/integration/tests.svg b/tests/badges/integration/tests.svg index 86d286d3..6666c2e5 100644 --- a/tests/badges/integration/tests.svg +++ b/tests/badges/integration/tests.svg @@ -2,10 +2,10 @@ - tests: 46/47 + tests: 74 @@ -41,9 +41,9 @@ tests - - 46/47 - 46/47 + + 74 + 74 diff --git a/tests/integration/harvest_job_flows/test_harvest_job_full_flow.py b/tests/integration/harvest_job_flows/test_harvest_job_full_flow.py index b9658187..d9dd364b 100644 --- a/tests/integration/harvest_job_flows/test_harvest_job_full_flow.py +++ b/tests/integration/harvest_job_flows/test_harvest_job_full_flow.py @@ -95,7 +95,7 @@ def test_multiple_harvest_jobs( count=True, ) - assert len(records_from_db) == records_from_db_count == 7 + assert len(records_from_db) == records_from_db_count == 3 @patch("harvester.harvest.ckan") @patch("harvester.harvest.download_file")