diff --git a/cg/services/order_validation_service/rules/sample/rules.py b/cg/services/order_validation_service/rules/sample/rules.py index 1f90deaf70..4266ac46e9 100644 --- a/cg/services/order_validation_service/rules/sample/rules.py +++ b/cg/services/order_validation_service/rules/sample/rules.py @@ -28,10 +28,10 @@ ) from cg.services.order_validation_service.rules.sample.utils import ( PlateSamplesValidator, - does_contain_multiple_applications, - does_contain_multiple_priorities, get_indices_for_repeated_sample_names, get_indices_for_tube_repeated_container_name, + has_multiple_applications, + has_multiple_priorities, is_container_name_missing, is_invalid_well_format, is_invalid_well_format_rml, @@ -256,7 +256,7 @@ def validate_pools_contain_one_application( errors: list[PoolApplicationError] = [] for pool, enumerated_samples in order.enumerated_pools.items(): samples: list[IndexedSample] = [sample for _, sample in enumerated_samples] - if does_contain_multiple_applications(samples): + if has_multiple_applications(samples): for sample_index, _ in enumerated_samples: error = PoolApplicationError(sample_index=sample_index, pool_name=pool) errors.append(error) @@ -269,7 +269,7 @@ def validate_pools_contain_one_priority( errors: list[PoolPriorityError] = [] for pool, enumerated_samples in order.enumerated_pools.items(): samples: list[IndexedSample] = [sample for _, sample in enumerated_samples] - if does_contain_multiple_priorities(samples): + if has_multiple_priorities(samples): for sample_index, _ in enumerated_samples: error = PoolPriorityError(sample_index=sample_index, pool_name=pool) errors.append(error) diff --git a/cg/services/order_validation_service/rules/sample/utils.py b/cg/services/order_validation_service/rules/sample/utils.py index 2079db9c90..fb5c9ab787 100644 --- a/cg/services/order_validation_service/rules/sample/utils.py +++ b/cg/services/order_validation_service/rules/sample/utils.py @@ -154,9 +154,9 @@ def validate_concentration_required(order: FastqOrder) -> list[ConcentrationRequ return errors -def does_contain_multiple_applications(samples: list[IndexedSample]) -> bool: +def has_multiple_applications(samples: list[IndexedSample]) -> bool: return len({sample.application for sample in samples}) > 1 -def does_contain_multiple_priorities(samples: list[IndexedSample]) -> bool: +def has_multiple_priorities(samples: list[IndexedSample]) -> bool: return len({sample.priority for sample in samples}) > 1