summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastermain/settings.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:01:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:29:24 +0000
commit9be7c5c18b325f6ed40bc431ac408db242007eb1 (patch)
treec9f5b762c66478602dc743045efe852e59bf39c1 /lib/toaster/toastermain/settings.py
parent168184b28165d7aa354b9092b5986f91c58d550d (diff)
downloadbitbake-contrib-9be7c5c18b325f6ed40bc431ac408db242007eb1.tar.gz
toastergui: fix error and warning counts for builds
The error and warning counts displayed for builds were counts of the errors and warnings objects associated with a build. Because these values were being derived on the fly, it was not possible to sort by them. Previously, the 3rd party django-aggregate-if library was used to add aggregate fields to Build objects and should then have been used to populate the "all builds" and "project builds" tables. However, at some point the templates had changed so that the error and warning counts were coming from the properties on the Build model and not from these aggregates. This meant that it was not possible to sort by these fields. Django 1.8 supports conditional aggregates in annotation fields on querysets. This means we can remove django-aggregate-if, use the new Django 1.8 feature to derive errors_no and warnings_no fields as annotations, then use those annotation fields in the templates. This makes the "builds" tables sortable again. [YOCTO #8738] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastermain/settings.py')
-rw-r--r--lib/toaster/toastermain/settings.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/toaster/toastermain/settings.py b/lib/toaster/toastermain/settings.py
index 74103f306..c4f3d6bff 100644
--- a/lib/toaster/toastermain/settings.py
+++ b/lib/toaster/toastermain/settings.py
@@ -399,12 +399,3 @@ class InvalidString(str):
"Undefined variable or unknown value for: \"%s\"" % other)
TEMPLATE_STRING_IF_INVALID = InvalidString("%s")
-
-import sys
-sys.path.append(
- os.path.join(
- os.path.join(
- os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
- "contrib"),
- "django-aggregate-if-master")
- )