Object.update already handles the cache eviction

This commit is contained in:
Mark Felder 2024-08-16 22:58:49 -04:00
parent 7e04a4c385
commit d61c99e905

View file

@ -383,7 +383,6 @@ defmodule Pleroma.Object do
end
@doc "Updates data field of an object"
@decorate cache_evict(cache: @nebulex, key: {Object, object.data["id"]})
def update_data(%Object{data: data} = object, attrs \\ %{}) do
object
|> Object.update(%{data: Map.merge(data || %{}, attrs)})