aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--lib/toaster/toastergui/templatetags/projecttags.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/toaster/toastergui/templatetags/projecttags.py b/lib/toaster/toastergui/templatetags/projecttags.py
index 1bc3bc231..8028ae002 100644
--- a/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/lib/toaster/toastergui/templatetags/projecttags.py
@@ -44,9 +44,10 @@ def sectohms(time):
return "%02d:%02d:%02d" % (hours, int((tdsec - (hours * 3600))/ 60), int(tdsec) % 60)
-@register.filter(name = 'mapselect')
-def mapselect(value, argument):
- return map(lambda x: vars(x)[argument], value)
+@register.filter(name = 'get_tasks')
+def get_tasks(queryset):
+ return list(target + ':' + task if task else target \
+ for target, task in queryset.values_list('target', 'task'))
@register.filter(name = "json")