From bc6e65721a10cdd99242f700f0f4ef86f2f28d6f Mon Sep 17 00:00:00 2001 From: Shettland Date: Fri, 20 Dec 2024 12:18:35 +0100 Subject: [PATCH] Cleaner way to extract only lineage_names --- core/utils/lineage.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/utils/lineage.py b/core/utils/lineage.py index 398ed2fe..2f36160f 100644 --- a/core/utils/lineage.py +++ b/core/utils/lineage.py @@ -5,13 +5,9 @@ def get_lineages_list(): """Function gets the lineage names and return then in an ordered list""" - latest_schema = core.utils.schema.get_default_schema() - lineage_name_field_id = core.models.LineageFields.objects.filter( - schemaID=latest_schema - ).first() return list( core.models.LineageValues.objects.all() - .filter(lineage_fieldID=lineage_name_field_id) + .filter(lineage_fieldID__property_name__iexact="lineage_name") .values_list("value", flat=True) .distinct() .order_by("value")