Nickolas Grigoriadis committed 8a9d64a

Queryset tuning.
Previously the function would generate 2 distinctly different querysets when getting a random cover image. This forces it to only do so once.

Comments (0)

Files changed (1)

             return self.cover
         elif getattr(self, '_cover', None):
             return self._cover
-        elif
-            self._cover ='?')[0]
+        try:
+            _cov ='?')[0]
+            self._cover = _cov
             return self._cover
-        else:
+        except IndexError:
             return None