diff --git a/zephyr/models.py b/zephyr/models.py index 3596bd7b2a..77a788bc52 100644 --- a/zephyr/models.py +++ b/zephyr/models.py @@ -127,7 +127,7 @@ class Huddle(models.Model): def get_huddle(id_list): id_list = sorted(set(id_list)) - hash_key = ",".join([str(x) for x in id_list]) + hash_key = ",".join(str(x) for x in id_list) huddle_hash = hashlib.sha1(hash_key).hexdigest() if Huddle.objects.filter(huddle_hash=huddle_hash): return Huddle.objects.get(huddle_hash=huddle_hash) diff --git a/zephyr/views.py b/zephyr/views.py index 9fda7d1348..bbb5469f4d 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -57,14 +57,14 @@ def home(request): personals = filter_by_subscriptions(Zephyr.objects.filter( recipient__type="personal").all(), request.user) people = simplejson.dumps(list( - set([get_display_recipient(zephyr.recipient) for zephyr in personals]))) + set(get_display_recipient(zephyr.recipient) for zephyr in personals))) publics = filter_by_subscriptions(Zephyr.objects.filter( recipient__type="class").all(), request.user) classes = simplejson.dumps(list( - set([get_display_recipient(zephyr.recipient) for zephyr in publics]))) - instances = simplejson.dumps(list(set( - [zephyr.instance for zephyr in publics]))) + set(get_display_recipient(zephyr.recipient) for zephyr in publics))) + instances = simplejson.dumps(list( + set(zephyr.instance for zephyr in publics))) return render_to_response('zephyr/index.html', {'zephyr_json' : zephyr_json,