-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API] orgEditTeam make Fields optional #9556
[API] orgEditTeam make Fields optional #9556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need team name based team endpoints for the API. (However we'll have to keep giving out the id to not break existing users)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. This will not work. See models.UpdateTeam
.
Codecov Report
@@ Coverage Diff @@
## master #9556 +/- ##
==========================================
+ Coverage 42.09% 42.23% +0.13%
==========================================
Files 584 587 +3
Lines 77497 77958 +461
==========================================
+ Hits 32624 32925 +301
- Misses 40859 40993 +134
- Partials 4014 4040 +26
Continue to review full report at Codecov.
|
@lunny tested and worked!
and if you mean https://github.com/go-gitea/gitea/blob/master/models/org_team.go#L581-L586 |
Have you tested a blank name? Or could you add a test for that situation? |
728ba18
to
ecc15a5
Compare
@lunny added Test and make all Fields optional |
@lunny I looked throu the whole function and found out that the API need all fields to be filed otherwhies it changes - eaven if you don't intend to :( now all fields are optional (beside id ...) |
use len() to check if string is empty Co-Authored-By: Lauris BH <[email protected]>
@lafriks added your suggestions |
This comment has been minimized.
This comment has been minimized.
@6543 You should not insert records with id on mssql since it's autoincrement. But mysql will support that. |
as title