diff options
Diffstat (limited to 'models/org_team.go')
-rw-r--r-- | models/org_team.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/org_team.go b/models/org_team.go index c42312323c..3d4a2882c7 100644 --- a/models/org_team.go +++ b/models/org_team.go @@ -238,7 +238,7 @@ func (t *Team) addRepository(ctx context.Context, repo *repo_model.Repository) ( return fmt.Errorf("getMembers: %v", err) } for _, u := range t.Members { - if err = watchRepo(e, u.ID, repo.ID, true); err != nil { + if err = repo_model.WatchRepoCtx(ctx, u.ID, repo.ID, true); err != nil { return fmt.Errorf("watchRepo: %v", err) } } @@ -341,7 +341,7 @@ func (t *Team) removeAllRepositories(ctx context.Context) (err error) { continue } - if err = watchRepo(e, user.ID, repo.ID, false); err != nil { + if err = repo_model.WatchRepoCtx(ctx, user.ID, repo.ID, false); err != nil { return err } @@ -399,7 +399,7 @@ func (t *Team) removeRepository(ctx context.Context, repo *repo_model.Repository continue } - if err = watchRepo(e, teamUser.UID, repo.ID, false); err != nil { + if err = repo_model.WatchRepoCtx(ctx, teamUser.UID, repo.ID, false); err != nil { return err } @@ -857,7 +857,7 @@ func AddTeamMember(team *Team, userID int64) error { return err } if setting.Service.AutoWatchNewRepos { - if err = watchRepo(sess, userID, repo.ID, true); err != nil { + if err = repo_model.WatchRepoCtx(ctx, userID, repo.ID, true); err != nil { return err } } |