diff options
author | Unknwon <u@gogs.io> | 2015-03-16 04:04:27 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-16 04:04:27 -0400 |
commit | 588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2 (patch) | |
tree | 3c62e7d0e50bf3d4046ecf07fd33063a3d8958ac /models/access.go | |
parent | 471b8a18ab73b181b0d6769e2bd95111afd0e9d3 (diff) | |
download | gitea-588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2.tar.gz gitea-588f3215c6c4a82c7ad9cbd2cc6a5683d0ca3cc2.zip |
#1040: dashboard no longer accessible when repo is missing
Diffstat (limited to 'models/access.go')
-rw-r--r-- | models/access.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/access.go b/models/access.go index f353c39a2f..ea2f7f7b4b 100644 --- a/models/access.go +++ b/models/access.go @@ -6,6 +6,8 @@ package models import ( "fmt" + + "github.com/gogits/gogs/modules/log" ) type AccessMode int @@ -77,6 +79,10 @@ func (u *User) GetAccessibleRepositories() (map[*Repository]AccessMode, error) { for _, access := range accesses { repo, err := GetRepositoryById(access.RepoID) if err != nil { + if IsErrRepoNotExist(err) { + log.Error(4, "%v", err) + continue + } return nil, err } if err = repo.GetOwner(); err != nil { |