API: Edit team breaks member and repository count #1579

Closed
opened 2025-11-02 04:05:35 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @nblock on GitHub (Mar 1, 2018).

  • Gitea version 1.3.3
  • Git version: 2.11.0
  • Operating system: Debian Stretch
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The following PATCH request to update an existing team breaks the member and repository count. 0 is shown while the team still lists all of its members and all of its repositories.

curl -X PATCH -H 'Authorization: token MYTOKEN' --data 'description=Jenkins and friends&name=CI&permission=read' https://gitea.example.com/api/v1/teams/49

Screenshots

Before
gitea_patch_before

After
gitea_patch_after

Originally created by @nblock on GitHub (Mar 1, 2018). - Gitea version 1.3.3 - Git version: 2.11.0 - Operating system: Debian Stretch - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: ## Description The following PATCH request to update an existing team breaks the member and repository count. 0 is shown while the team still lists all of its members and all of its repositories. ``` curl -X PATCH -H 'Authorization: token MYTOKEN' --data 'description=Jenkins and friends&name=CI&permission=read' https://gitea.example.com/api/v1/teams/49 ``` ## Screenshots Before ![gitea_patch_before](https://user-images.githubusercontent.com/131119/36837754-8493f292-1d3d-11e8-8cdb-6868f77b26cc.png) After ![gitea_patch_after](https://user-images.githubusercontent.com/131119/36837776-934ac7a2-1d3d-11e8-8831-0b6e4f8d1d9e.png)
GiteaMirror added the type/bug label 2025-11-02 04:05:35 -06:00
Author
Owner

@nblock commented on GitHub (Mar 2, 2018):

The swagger documentation for https://try.gitea.io/api/swagger#/organization/orgEditTeam specifies the content type as application/json while only form data works.

@nblock commented on GitHub (Mar 2, 2018): The swagger documentation for https://try.gitea.io/api/swagger#/organization/orgEditTeam specifies the content type as `application/json` while only form data works.
Author
Owner

@thehowl commented on GitHub (Apr 22, 2018):

Can you please create another issue for the one you posted in the comment?

@thehowl commented on GitHub (Apr 22, 2018): Can you please create another issue for the one you posted in the comment?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1579