summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 85f2a913d3..3d38ed6689 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -733,7 +733,7 @@ func UpdateRepository(repo *Repository) error {
}
// DeleteRepository deletes a repository for a user or orgnaztion.
-func DeleteRepository(userId, repoId int64, userName string) (err error) {
+func DeleteRepository(userId, repoId int64, userName string) error {
repo := &Repository{Id: repoId, OwnerId: userId}
has, err := x.Get(repo)
if err != nil {
@@ -747,6 +747,7 @@ func DeleteRepository(userId, repoId int64, userName string) (err error) {
if err = sess.Begin(); err != nil {
return err
}
+
if _, err = sess.Delete(&Repository{Id: repoId}); err != nil {
sess.Rollback()
return err