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. |
|
|
41 |
except |
|
|
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 |
|
|
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