From 7d907ce8c09117ae787d9e85d40b67426a02b836 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 18 Sep 2024 13:32:42 +0100 Subject: [PATCH] fixing bug to allow all measures when no inclusions or exclusions are specified --- recommendations/Recommendations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recommendations/Recommendations.py b/recommendations/Recommendations.py index d2c1db1b..fbaf0f9b 100644 --- a/recommendations/Recommendations.py +++ b/recommendations/Recommendations.py @@ -79,7 +79,9 @@ class Recommendations: inclusions_full = [MEASURE_MAP[x] if x in MEASURE_MAP else x for x in self.inclusions] exclusions_full = [MEASURE_MAP[x] if x in MEASURE_MAP else x for x in self.exclusions] - if inclusions_full and exclusions_full: + # If inclusions and exclusions are empty, it means that nothing was specified, so we allow + # all recommendation types + if not inclusions_full and not exclusions_full: # All typical measures return self.all_specific_measures