except Book.DoesNotExist:
return False
- results = filter(ensure_exists, results)
+ results = [r for r in results if ensure_exists(r)]
return results
except Picture.DoesNotExist:
return False
- results = filter(ensure_exists, results)
+ results = [r for r in results if ensure_exists(r)]
return results