Browse files

Use User.get_username() for article cache instead of User.__str__

  • Loading branch information...
oleast committed Nov 15, 2018
1 parent b37e0ad commit e7533c57535f27e688d102b2b2da5fdd4699ca4a
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/wiki/models/
@@ -207,9 +207,9 @@ def get_cache_key(self):
def get_cache_content_key(self, user=None):
"""Returns per-article-user cache key."""
return "{key}:{user!s}".format(
return "{key}:{user}".format(
user=user if user else "")
user=user.get_username() if user else "")
def get_cached_content(self, user=None):
"""Returns cached version of rendered article.

0 comments on commit e7533c5

Please sign in to comment.