diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-10-14 22:37:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-14 22:37:43 +0800 |
commit | 514006a2e5a33074fba5ac2deab9ab91cf5713a2 (patch) | |
tree | 0c86143623d35607428061c216e32fd48879c3f1 /models/repo.go | |
parent | a4cd4616c6f8524f8eb79d6184e855b3a8164130 (diff) | |
download | gitea-514006a2e5a33074fba5ac2deab9ab91cf5713a2.tar.gz gitea-514006a2e5a33074fba5ac2deab9ab91cf5713a2.zip |
Fix orgnization user watch repository (#2670)
* remove orgnization watch repositories
* fix migration
* fix typo and missing change
* remove unused code
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index f457bdb222..740bbe8da9 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1295,7 +1295,7 @@ func createRepository(e *xorm.Session, doer, u *User, repo *Repository) (err err } } - if err = watchRepo(e, u.ID, repo.ID, true); err != nil { + if err = watchRepo(e, doer.ID, repo.ID, true); err != nil { return fmt.Errorf("watchRepo: %v", err) } else if err = newRepoAction(e, u, repo); err != nil { return fmt.Errorf("newRepoAction: %v", err) @@ -1480,7 +1480,7 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error return fmt.Errorf("decrease old owner repository count: %v", err) } - if err = watchRepo(sess, newOwner.ID, repo.ID, true); err != nil { + if err = watchRepo(sess, doer.ID, repo.ID, true); err != nil { return fmt.Errorf("watchRepo: %v", err) } else if err = transferRepoAction(sess, doer, owner, repo); err != nil { return fmt.Errorf("transferRepoAction: %v", err) |