##// END OF EJS Templates
Get opening post only once when reversing post url
neko259 -
r591:12e7d699 default
parent child Browse files
Show More
@@ -318,9 +318,10 b' class Post(models.Model):'
318 318 link = cache.get(cache_key)
319 319
320 320 if not link:
321 if not self.is_opening():
322 link = reverse('thread', kwargs={
323 'post_id': self.thread_new.get_opening_post().id}) + '#' + str(
321 opening_post = self.thread_new.get_opening_post()
322 if self == opening_post:
323 link = reverse('thread',
324 kwargs={'post_id': opening_post.id}) + '#' + str(
324 325 self.id)
325 326 else:
326 327 link = reverse('thread', kwargs={'post_id': self.id})
General Comments 0
You need to be logged in to leave comments. Login now