Skip to content

Commit

Permalink
fix: post compose is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
vas3k committed Oct 23, 2023
1 parent df3daa5 commit 9f1e798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posts/views/posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def create_or_edit(request, post_type, post=None, mode="create"):
# validate form on POST
form = FormClass(request.POST, request.FILES, instance=post)
if form.is_valid():
if post.type != Post.TYPE_INTRO and not request.me.is_moderator:
if (post and post.type != Post.TYPE_INTRO) and not request.me.is_moderator:
if Post.check_duplicate(
user=request.me,
title=form.cleaned_data["title"],
Expand Down

0 comments on commit 9f1e798

Please sign in to comment.