diff --git a/lib/kmxgit_web/controllers/repository_controller.ex b/lib/kmxgit_web/controllers/repository_controller.ex
index 6b5e1dc..05c251c 100644
--- a/lib/kmxgit_web/controllers/repository_controller.ex
+++ b/lib/kmxgit_web/controllers/repository_controller.ex
@@ -696,8 +696,12 @@ defmodule KmxgitWeb.RepositoryController do
IO.inspect(err)
nil
end
- %{git | log1: log1}
- |> git_add_user_email(log1.author_email)
+ if log1 do
+ %{git | log1: log1}
+ |> git_add_user_email(log1.author_email)
+ else
+ git
+ end
end
defp git_put_log1(git, _, _, _) do
git