Created
January 11, 2012 19:45
-
-
Save andymckay/1596403 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/listener/normal/error/forms.py b/listener/normal/error/forms.py | |
index ec65f1f..699431b 100644 | |
--- a/listener/normal/error/forms.py | |
+++ b/listener/normal/error/forms.py | |
@@ -77,9 +77,9 @@ class GroupForm(Filter): | |
@memoize(prefix='get-domains', time=120) | |
def get_domains(): | |
- domains = [('','')] | |
errs = Error.objects.order_by().values_list('domain', flat=True).distinct() | |
- domains.extend([(d, d) for d in errs]) | |
+ domains = sorted([(d, d) for d in errs]) | |
+ domains.insert(('', '')) | |
return domains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment