diff --git a/src/open_inwoner/cms/plugins/models/tasks.py b/src/open_inwoner/cms/plugins/models/tasks.py index 26bbf37e44..4b883b65e4 100644 --- a/src/open_inwoner/cms/plugins/models/tasks.py +++ b/src/open_inwoner/cms/plugins/models/tasks.py @@ -27,7 +27,7 @@ def get_tasks(self): ) ] - def get_tasks_by_bsn(self, bsn): + def get_tasks_by_bsn(self, bsn, status="open"): tasks = [] for task in self.get_tasks(): identificatie = task["identificatie"] @@ -35,5 +35,7 @@ def get_tasks_by_bsn(self, bsn): continue task_bsn = identificatie["value"] if task_bsn and task_bsn == bsn: + if status and task["status"] != status: + continue tasks += [task] return tasks diff --git a/src/open_inwoner/templates/cms/plugins/tasks/tasks.html b/src/open_inwoner/templates/cms/plugins/tasks/tasks.html index e7b9a0cb68..223605d1b3 100644 --- a/src/open_inwoner/templates/cms/plugins/tasks/tasks.html +++ b/src/open_inwoner/templates/cms/plugins/tasks/tasks.html @@ -12,7 +12,7 @@

{% for task in tasks %} - +