Skip to content
Snippets Groups Projects
Commit 8c96b508 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

only return initTables that have a valide filename

parent f6e776c1
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ from tables import HDF5ExtError
from jass import util
from jass.config import config
from jass.models.phenotype import Phenotype, get_available_phenotypes, PhenotypeIdList, InitTableNameModel
from jass.models.inittable import get_inittable_meta
from jass.models.inittable import get_inittable_meta, valideInitTableNamePattern
from jass.models.project import GlobalProject, load_project as project__load_project
from jass.tasks import create_project, run_project_analysis_if_needed, get_queue_status
......@@ -56,7 +56,11 @@ async def read_index():
def inittable_list():
"""List initTables"""
for filename in os.listdir(config["DATA_DIR"]):
if filename.endswith(".hdf5") and "worktable" not in filename:
if (
filename.endswith(".hdf5")
and "worktable" not in filename
and valideInitTableNamePattern.match(filename)
):
yield filename
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment