Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
krrish-sehgal committed Jan 26, 2025
2 parents dd921f8 + dac9a28 commit d36ab7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("comments", "0006_comment_author_fk"),
("contenttypes", "0002_remove_content_type_name"),
Expand Down
2 changes: 2 additions & 0 deletions website/views/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,7 @@ def comment_on_content(request, content_pk):
content_type = request.POST.get("content_type")
content_type_obj = ContentType.objects.get(model=content_type)
content = content_type_obj.get_object_for_this_type(pk=content_pk)

VALID_CONTENT_TYPES = ["issue", "post"]

if request.method == "POST" and isinstance(request.user, User):
Expand All @@ -1522,6 +1523,7 @@ def comment_on_content(request, content_pk):

if parent_comment is None:
messages.error(request, "Parent comment doesn't exist.")

return redirect("home")

Comment.objects.create(
Expand Down

0 comments on commit d36ab7d

Please sign in to comment.