Fix atom leak in background worker
The only permitted values are "blocks_import", "follow_import", "mutes_import" of which we already have the equivalent atoms defined.
This commit is contained in:
parent
86e6d395d9
commit
91c83a82a0
@ -28,7 +28,7 @@ defmodule Pleroma.Workers.BackgroundWorker do
|
|||||||
def perform(%Job{args: %{"op" => op, "user_id" => user_id, "identifiers" => identifiers}})
|
def perform(%Job{args: %{"op" => op, "user_id" => user_id, "identifiers" => identifiers}})
|
||||||
when op in ["blocks_import", "follow_import", "mutes_import"] do
|
when op in ["blocks_import", "follow_import", "mutes_import"] do
|
||||||
user = User.get_cached_by_id(user_id)
|
user = User.get_cached_by_id(user_id)
|
||||||
{:ok, User.Import.perform(String.to_atom(op), user, identifiers)}
|
{:ok, User.Import.perform(String.to_existing_atom(op), user, identifiers)}
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform(%Job{
|
def perform(%Job{
|
||||||
|
Loading…
Reference in New Issue
Block a user