From 5b23dfa1c5e6a3ec30fc6dc32761f27968eabf2f Mon Sep 17 00:00:00 2001 From: cascode Date: Fri, 4 Jan 2019 01:35:26 -0800 Subject: [PATCH] handle null --- lib/pleroma/user.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 1edded415..0e5e2d943 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -610,7 +610,7 @@ def search(query, resolve \\ false) do select_merge: %{ search_distance: fragment( - "? <-> (? || ?)", + "? <-> (? || coalesce(?, ''))", ^query, u.nickname, u.name