diff options
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) |