mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
hotfix comment creation with locked comments
This commit is contained in:
parent
fcd57a575a
commit
29dd045202
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ defmodule Philomena.Comments do
|
||||||
{:error, %Ecto.Changeset{}}
|
{:error, %Ecto.Changeset{}}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def create_comment(image, attribution, params \\ %{}) do
|
def create_comment(%Image{commenting_allowed: true} = image, attribution, params \\ %{}) do
|
||||||
comment =
|
comment =
|
||||||
Ecto.build_assoc(image, :comments)
|
Ecto.build_assoc(image, :comments)
|
||||||
|> Comment.creation_changeset(params, attribution)
|
|> Comment.creation_changeset(params, attribution)
|
||||||
|
|
Loading…
Reference in a new issue