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