From 51ef0050523efb6c5c2b588027973e4e7018796d Mon Sep 17 00:00:00 2001 From: bsimpson63 Date: Wed, 27 Feb 2013 13:37:59 -0500 Subject: [PATCH] Clean up lookups in spotlight. --- r2/r2/models/listing.py | 1 - r2/r2/templates/spotlightlisting.html | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/r2/r2/models/listing.py b/r2/r2/models/listing.py index 0146a68c5..eec38536c 100644 --- a/r2/r2/models/listing.py +++ b/r2/r2/models/listing.py @@ -191,5 +191,4 @@ class SpotlightListing(Listing): res = Listing.listing(self) for t in res.things: t.num = "" - self.lookup = {t._fullname: t for t in res.things} return Wrapped(self) diff --git a/r2/r2/templates/spotlightlisting.html b/r2/r2/templates/spotlightlisting.html index c0386988f..f9e958516 100644 --- a/r2/r2/templates/spotlightlisting.html +++ b/r2/r2/templates/spotlightlisting.html @@ -29,11 +29,9 @@ %>
- %if thing.links: - %for tup in thing.links: - %if tup.link in thing.lookup: - ${unsafe(thing.lookup[tup.link].render(display=False))} - %endif + %if thing.things: + %for link in thing.things: + ${unsafe(link.render(display=False))} %endfor %endif