Browse Source

Bug fix

tags/v1.2.0-rc1
Unknown 12 years ago
parent
commit
f9fd972cbe
2 changed files with 6 additions and 4 deletions
  1. +2
    -2
      modules/mailer/mailer.go
  2. +4
    -2
      modules/middleware/repo.go

+ 2
- 2
modules/mailer/mailer.go View File

@@ -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))
}
}
}


+ 4
- 2
modules/middleware/repo.go View File

@@ -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


Loading…
Cancel
Save