Show More
@@ -37,13 +37,13 b' class ThreadView(BaseBoardView, PostMixi' | |||||
37 |
|
37 | |||
38 | def get(self, request, post_id, form: PostForm=None): |
|
38 | def get(self, request, post_id, form: PostForm=None): | |
39 | try: |
|
39 | try: | |
40 |
opening_post = Post.objects. |
|
40 | opening_post = Post.objects.get(id=post_id) | |
41 |
except |
|
41 | except DoesNotExist: | |
42 | raise Http404 |
|
42 | raise Http404 | |
43 |
|
43 | |||
44 | # If this is not OP, don't show it as it is |
|
44 | # If this is not OP, don't show it as it is | |
45 |
if |
|
45 | if not opening_post.is_opening(): | |
46 | raise Http404 |
|
46 | return redirect(opening_post.get_thread().get_opening_post().get_url()) | |
47 |
|
47 | |||
48 | if not form: |
|
48 | if not form: | |
49 | form = PostForm(error_class=PlainErrorList) |
|
49 | form = PostForm(error_class=PlainErrorList) |
General Comments 0
You need to be logged in to leave comments.
Login now