diff --git a/platform/lib/platform/updates.ex b/platform/lib/platform/updates.ex index a220855ff..48070736a 100644 --- a/platform/lib/platform/updates.ex +++ b/platform/lib/platform/updates.ex @@ -308,7 +308,7 @@ defmodule Platform.Updates do @doc """ Helper API function that takes attribute change information and uses it to create an Update changeset. Requires 'explanation' to be in attrs. """ - def change_from_media_creation(%Media{} = media, %_{} = user_or_token) when user_or_token in [%User{}, %APIToken{}] do + def change_from_media_creation(%Media{} = media, %_{} = user_or_token) when is_struct(user_or_token, User) or is_struct(user_or_token, APIToken) do change_update( %Update{}, media,