summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/mailer/mailer.go4
-rw-r--r--modules/middleware/repo.go6
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go
index 3823e01fa6..150607f8c4 100644
--- a/modules/mailer/mailer.go
+++ b/modules/mailer/mailer.go
@@ -57,9 +57,9 @@ func processMailQueue() {
info = ", info: " + msg.Info
}
log.Error(fmt.Sprintf("Async sent email %d succeed, not send emails: %s%s err: %s", num, tos, info, err))
- return
+ } else {
+ log.Trace(fmt.Sprintf("Async sent email %d succeed, sent emails: %s%s", num, tos, info))
}
- log.Trace(fmt.Sprintf("Async sent email %d succeed, sent emails: %s%s", num, tos, info))
}
}
}
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index f0cab8e895..b25c942316 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -65,9 +65,11 @@ func RepoAssignment(redirect bool) martini.Handler {
}
ctx.Repo.IsValid = true
- ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id)
+ if ctx.User != nil {
+ ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id)
+ }
ctx.Repo.Repository = repo
- ctx.Repo.CloneLink.SSH = fmt.Sprintf("git@%s:%s/%s.git", base.Domain, ctx.User.LowerName, repo.LowerName)
+ ctx.Repo.CloneLink.SSH = fmt.Sprintf("git@%s:%s/%s.git", base.Domain, user.LowerName, repo.LowerName)
ctx.Data["IsRepositoryValid"] = true
ctx.Data["Repository"] = repo