From 4f2a75b64fd06fc03fcb59684c875e998231441b Mon Sep 17 00:00:00 2001 From: graham-dds Date: Wed, 20 Nov 2019 11:43:59 -0500 Subject: [PATCH] Add active CLINS property to portfolio model --- atst/models/portfolio.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atst/models/portfolio.py b/atst/models/portfolio.py index d749e470..b5d4fb11 100644 --- a/atst/models/portfolio.py +++ b/atst/models/portfolio.py @@ -65,6 +65,15 @@ class Portfolio( def num_task_orders(self): return len(self.task_orders) + @property + def active_clins(self): + return [ + clin + for task_order in self.task_orders + for clin in task_order.clins + if clin.is_active + ] + @property def members(self): return (