Add type check for cache
This commit is contained in:
parent
f1ba0e79c1
commit
0ea822f7a0
10 changed files with 35 additions and 13 deletions
|
@ -133,7 +133,7 @@ class BlogPost(models.Model, PageVotable, Bookmarkable):
|
|||
and self.authors.filter(id=user.profile.id).exists()
|
||||
)
|
||||
|
||||
@cache_wrapper(prefix="BPga")
|
||||
@cache_wrapper(prefix="BPga", expected_type=models.query.QuerySet)
|
||||
def get_authors(self):
|
||||
return self.authors.only("id")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue