From 7e54ea61c374e15df31c41c1ca87a001acd85242 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 17 Sep 2024 12:46:31 -0500 Subject: UI Improvements: Enumerate data in tables. --- uploader/samples/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'uploader/samples/views.py') diff --git a/uploader/samples/views.py b/uploader/samples/views.py index 4332c21..fd3c601 100644 --- a/uploader/samples/views.py +++ b/uploader/samples/views.py @@ -19,9 +19,9 @@ from flask import ( from uploader import jobs from uploader.files import save_file -from uploader.datautils import order_by_family from uploader.authorisation import require_login from uploader.input_validation import is_integer_input +from uploader.datautils import order_by_family, enumerate_sequence from uploader.db_utils import ( with_db_connection, database_connection, @@ -107,8 +107,8 @@ def list_samples(species_id: int, population_id: int): "species.populations.samples.select_population", species_id=species_id)) - all_samples = samples_by_species_and_population( - conn, species_id, population_id) + all_samples = enumerate_sequence(samples_by_species_and_population( + conn, species_id, population_id)) total_samples = len(all_samples) offset = int(request.args.get("from") or 0) if offset < 0: -- cgit v1.2.3