Use Object.change instead of Ecto.Changeset.change

This commit is contained in:
Rin Toshaka 2018-12-30 11:08:19 +01:00
parent 9a0163db53
commit a32e23905a

View file

@ -300,7 +300,6 @@ def get_scrubbed_html(
if !(new_scrubber_cache == scrubber_cache) or scrubbed_html == nil do
scrubbed_html = HTML.filter_tags(content, scrubbers)
new_scrubber_cache = [%{:scrubbers => key, :content => scrubbed_html} | new_scrubber_cache]
IO.puts(activity)
activity =
Map.put(
@ -309,7 +308,7 @@ def get_scrubbed_html(
Kernel.put_in(activity.data, ["object", "scrubber_cache"], new_scrubber_cache)
)
cng = Ecto.Changeset.change(activity)
cng = Object.change(activity)
Repo.update(cng)
scrubbed_html
else