From 87ad4961f62c24cf75377f3055e9769e269c80d9 Mon Sep 17 00:00:00 2001
From: Lunny Xiao <xiaolunwen@gmail.com>
Date: Sat, 14 Jan 2017 10:07:04 +0800
Subject: [PATCH] bug fixed for update repository (#664)

---
 models/repo.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/models/repo.go b/models/repo.go
index 5868b8b705a5..385e9e42d63b 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1371,7 +1371,7 @@ func UpdateRepository(repo *Repository, visibilityChanged bool) (err error) {
 		return err
 	}
 
-	if err = updateRepository(x, repo, visibilityChanged); err != nil {
+	if err = updateRepository(sess, repo, visibilityChanged); err != nil {
 		return fmt.Errorf("updateRepository: %v", err)
 	}