[PR #1035] [MERGED] Remove unnecessary loads in org_team #15723

Closed
opened 2025-11-02 11:53:08 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1035
Author: @ethantkoenig
Created: 2/23/2017
Status: Merged
Merged: 2/24/2017
Merged by: @lunny

Base: masterHead: refactor/org_team


📝 Commits (1)

  • 20adbb4 Remove unnecessary loads in org_team

📊 Changes

3 files changed (+39 additions, -51 deletions)

View changed files

📝 models/org.go (+1 -1)
📝 models/org_team.go (+35 -47)
📝 models/org_team_test.go (+3 -3)

📄 Description

Remove unnecessary calls to getTeamByID(..) in AddTeamMember(..) and RemoveTeamMember(..). In every codepath that calls AddTeamMember(..) or RemoveTeamMember(..), the team in question had already been loaded.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1035 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 2/23/2017 **Status:** ✅ Merged **Merged:** 2/24/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `refactor/org_team` --- ### 📝 Commits (1) - [`20adbb4`](https://github.com/go-gitea/gitea/commit/20adbb4dd67c461555a331802187ad5fce0a9cf9) Remove unnecessary loads in org_team ### 📊 Changes **3 files changed** (+39 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `models/org.go` (+1 -1) 📝 `models/org_team.go` (+35 -47) 📝 `models/org_team_test.go` (+3 -3) </details> ### 📄 Description Remove unnecessary calls to `getTeamByID(..)` in `AddTeamMember(..)` and `RemoveTeamMember(..)`. In every codepath that calls `AddTeamMember(..)` or `RemoveTeamMember(..)`, the team in question had already been loaded. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:53:08 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15723