##// END OF EJS Templates
When trying to opening thread by passing non-opening post ID, find its proper...
neko259 -
r1013:27950bd6 default
parent child Browse files
Show More
@@ -37,13 +37,13 b' class ThreadView(BaseBoardView, PostMixi'
37 37
38 38 def get(self, request, post_id, form: PostForm=None):
39 39 try:
40 opening_post = Post.objects.filter(id=post_id).first()
41 except IndexError:
40 opening_post = Post.objects.get(id=post_id)
41 except DoesNotExist:
42 42 raise Http404
43 43
44 44 # If this is not OP, don't show it as it is
45 if not opening_post or not opening_post.is_opening():
46 raise Http404
45 if not opening_post.is_opening():
46 return redirect(opening_post.get_thread().get_opening_post().get_url())
47 47
48 48 if not form:
49 49 form = PostForm(error_class=PlainErrorList)
General Comments 0
You need to be logged in to leave comments. Login now