From 07c6c4a4ff2beffc85f1e3a392ea404796921df3 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 7 Feb 2014 03:22:57 -0700 Subject: [PATCH] fixed issue adding repository when no teams exist --- pkg/handler/repos.go | 3 +++ pkg/template/pages/github_add.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/handler/repos.go b/pkg/handler/repos.go index 59453aac4..61c205f3c 100644 --- a/pkg/handler/repos.go +++ b/pkg/handler/repos.go @@ -2,6 +2,7 @@ package handler import ( "fmt" + "log" "net/http" "github.com/drone/drone/pkg/channel" @@ -99,6 +100,7 @@ func RepoCreateGithub(w http.ResponseWriter, r *http.Request, u *User) error { if len(teamName) > 0 { team, err := database.GetTeamSlug(teamName) if err != nil { + log.Printf("error retrieving team %s", teamName) return err } @@ -134,6 +136,7 @@ func RepoCreateGithub(w http.ResponseWriter, r *http.Request, u *User) error { // Save to the database if err := database.SaveRepo(repo); err != nil { + log.Print("error saving new repository to the database") return err } diff --git a/pkg/template/pages/github_add.html b/pkg/template/pages/github_add.html index 397bd2bbe..5fcd50e42 100644 --- a/pkg/template/pages/github_add.html +++ b/pkg/template/pages/github_add.html @@ -45,7 +45,7 @@
Select your Drone account