+ selected_filters.append((keywords, 'keywords', keywords))
+
+ if status:
+ statuses = []
+ for s in status:
+ si = int(s)
+ statuses.extend(FiltersForm.STATUS_MAP[si])
+ selected_filters.append((FiltersForm.STATUS_CHOICES_DICT[si], 'status', s))
+
+ tasks = tasks.filter(status__in=statuses)
+
+ if host:
+ tasks = tasks.filter(allocations__host_name__in=host)
+
+ host_dict = dict(filters.fields['host'].choices)
+ for h in host:
+ selected_filters.append((host_dict[h], 'host', h))
+