handle null
authorcascode <cascode@amplifie.red>
Fri, 4 Jan 2019 09:35:26 +0000 (01:35 -0800)
committercascode <cascode@amplifie.red>
Fri, 4 Jan 2019 09:35:26 +0000 (01:35 -0800)
lib/pleroma/user.ex

index 1edded4151fe0e4a16a9635acec473c04c77c6a8..0e5e2d943e79d5dffd256d9f560df1245b2b7044 100644 (file)
@@ -610,7 +610,7 @@ defmodule Pleroma.User do
         select_merge: %{
           search_distance:
             fragment(
-              "? <-> (? || ?)",
+              "? <-> (? || coalesce(?, ''))",
               ^query,
               u.nickname,
               u.name